From 0dbd5fdada5f7069bcfb0a9abc97cb68c382c1c2 Mon Sep 17 00:00:00 2001 From: Anthony Salemo Date: Thu, 13 Jul 2023 13:09:57 -0400 Subject: [PATCH] Create an auto-deploy file --- ...r-34a84952-ffce-4e39-a7e0-d95368a147ea.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ansalemo-gh-actions-acaenv-AutoDeployTrigger-34a84952-ffce-4e39-a7e0-d95368a147ea.yml diff --git a/.github/workflows/ansalemo-gh-actions-acaenv-AutoDeployTrigger-34a84952-ffce-4e39-a7e0-d95368a147ea.yml b/.github/workflows/ansalemo-gh-actions-acaenv-AutoDeployTrigger-34a84952-ffce-4e39-a7e0-d95368a147ea.yml new file mode 100644 index 0000000..a8131af --- /dev/null +++ b/.github/workflows/ansalemo-gh-actions-acaenv-AutoDeployTrigger-34a84952-ffce-4e39-a7e0-d95368a147ea.yml @@ -0,0 +1,42 @@ +name: Trigger auto deployment for ansalemo-gh-actions-acaenv + +# When this action will be executed +on: + # Automatically trigger it when detected changes in repo + push: + branches: + [ main ] + paths: + - '**' + - '.github/workflows/ansalemo-gh-actions-acaenv-AutoDeployTrigger-34a84952-ffce-4e39-a7e0-d95368a147ea.yml' + + # Allow mannually 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.ANSALEMOGHACTIONSACAENV_AZURE_CREDENTIALS }} + + - name: Build and push container image to registry + uses: azure/container-apps-deploy-action@v1 + with: + appSourcePath: ${{ github.workspace }} + registryUrl: ansalemoacr.azurecr.io + registryUsername: ${{ secrets.ANSALEMOGHACTIONSACAENV_REGISTRY_USERNAME }} + registryPassword: ${{ secrets.ANSALEMOGHACTIONSACAENV_REGISTRY_PASSWORD }} + containerAppName: ansalemo-gh-actions-acaenv + resourceGroup: ansalemo-rg + imageToBuild: ansalemoacr.azurecr.io/ansalemo-gh-actions-acaenv:${{ github.sha }} + dockerfilePath: Dockerfile + + +