Configuration Files
Production-ready configuration files with detailed comments and best practices. Each file works together as a complete deployment solution.
name: Deploy to Azure Container Instances
on:
push:
branches: [main]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Deploy to Azure Container Instances
uses: azure/aci-deploy@v1
with:
resource-group: my-resource-group
dns-name-label: my-app
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
name: my-container
location: eastus
ports: 80 443
cpu: 1
memory: 1.5