From 2ab5617c0cf5aaf9f7ece00bde5c9c4e368477e8 Mon Sep 17 00:00:00 2001 From: "Benjamin D. Brodie" <113984758+bdb-dd@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:43:45 +0200 Subject: [PATCH] Create an auto-deploy file --- ...r-b3f5dbde-b8af-4b5f-94e9-d2eb110abe37.yml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/assistants-slack-altinndevops-AutoDeployTrigger-b3f5dbde-b8af-4b5f-94e9-d2eb110abe37.yml diff --git a/.github/workflows/assistants-slack-altinndevops-AutoDeployTrigger-b3f5dbde-b8af-4b5f-94e9-d2eb110abe37.yml b/.github/workflows/assistants-slack-altinndevops-AutoDeployTrigger-b3f5dbde-b8af-4b5f-94e9-d2eb110abe37.yml new file mode 100644 index 0000000..a912fa8 --- /dev/null +++ b/.github/workflows/assistants-slack-altinndevops-AutoDeployTrigger-b3f5dbde-b8af-4b5f-94e9-d2eb110abe37.yml @@ -0,0 +1,43 @@ +name: Trigger auto deployment for assistants-slack-altinndevops + +# When this action will be executed +on: + # Automatically trigger it when detected changes in repo + push: + branches: + [ main ] + paths: + - '**' + - '.github/workflows/assistants-slack-altinndevops-AutoDeployTrigger-b3f5dbde-b8af-4b5f-94e9-d2eb110abe37.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.ASSISTANTSSLACKALTINNDEVOPS_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.ASSISTANTSSLACKALTINNDEVOPS_REGISTRY_USERNAME }} + registryPassword: ${{ secrets.ASSISTANTSSLACKALTINNDEVOPS_REGISTRY_PASSWORD }} + containerAppName: assistants-slack-altinndevops + resourceGroup: assistants-prod-norwayeast + imageToBuild: altinnaicontainers.azurecr.io/assistants-slack-altinndevops:${{ github.sha }} + + + + +