Skip to content

Create an auto-deploy file #1

Create an auto-deploy file

Create an auto-deploy file #1

name: Trigger auto deployment for assistants-slack-altinn
# When this action will be executed
on:
# Automatically trigger it when detected changes in repo
push:
branches:
[ main ]
paths:
- '**'
- '.github/workflows/assistants-slack-altinn-AutoDeployTrigger-d1dc56ad-2283-4417-879e-19c246b15681.yml'
# Allow manual trigger
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout to the branch
uses: actions/checkout@v2
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.ASSISTANTSSLACKALTINN_AZURE_CREDENTIALS }}
- name: Build and push container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
registryUrl: altinnaicontainers.azurecr.io
registryUsername: ${{ secrets.ASSISTANTSSLACKALTINN_REGISTRY_USERNAME }}
registryPassword: ${{ secrets.ASSISTANTSSLACKALTINN_REGISTRY_PASSWORD }}
containerAppName: assistants-slack-altinn
resourceGroup: assistants-prod-norwayeast
imageToBuild: altinnaicontainers.azurecr.io/digdir-assistants-prod:${{ github.sha }}