file size cap #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD Pipeline | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Login to Azure | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Login to Docker Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: containregis2.azurecr.io | |
username: ${{ secrets.AZURE_CLIENT_ID }} | |
password: ${{ secrets.AZURE_CLIENT_SECRET }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: containregis2.azurecr.io/my-python-app:latest | |
- name: Deploy to Azure Container Instances | |
uses: azure/aci-deploy@v1 | |
with: | |
resource-group: myResourceGroup | |
name: containregis2 | |
image: containregis2.azurecr.io/my-python-app:latest | |
dns-name-label: containregis2 | |
ports: 80 | |
location: eastus | |
registry-login-server: containregis2.azurecr.io | |
registry-username: ${{ secrets.AZURE_CLIENT_ID }} | |
registry-password: ${{ secrets.AZURE_CLIENT_SECRET }} |