From 9b17955080f463214315ee3c6cc2bac9e5b5de9f Mon Sep 17 00:00:00 2001 From: Adithya Awati Date: Sat, 18 May 2024 00:37:30 +0530 Subject: [PATCH] Create an auto-deploy file --- ...r-bbcd2ce3-6129-4d93-b5e6-b6f57044f3a8.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/aventus-AutoDeployTrigger-bbcd2ce3-6129-4d93-b5e6-b6f57044f3a8.yml diff --git a/.github/workflows/aventus-AutoDeployTrigger-bbcd2ce3-6129-4d93-b5e6-b6f57044f3a8.yml b/.github/workflows/aventus-AutoDeployTrigger-bbcd2ce3-6129-4d93-b5e6-b6f57044f3a8.yml new file mode 100644 index 0000000..6176105 --- /dev/null +++ b/.github/workflows/aventus-AutoDeployTrigger-bbcd2ce3-6129-4d93-b5e6-b6f57044f3a8.yml @@ -0,0 +1,47 @@ +name: Trigger auto deployment for aventus + +# When this action will be executed +on: + # Automatically trigger it when detected changes in repo + push: + branches: + [ main ] + paths: + - '**' + - '.github/workflows/aventus-AutoDeployTrigger-bbcd2ce3-6129-4d93-b5e6-b6f57044f3a8.yml' + + # Allow manual trigger + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + permissions: + id-token: write #This is required for requesting the OIDC JWT Token + contents: read #Required when GH token is used to authenticate with private repo + + steps: + - name: Checkout to the branch + uses: actions/checkout@v2 + + - name: Azure Login + uses: azure/login@v1 + with: + client-id: ${{ secrets.AVENTUS_AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AVENTUS_AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AVENTUS_AZURE_SUBSCRIPTION_ID }} + + - name: Build and push container image to registry + uses: azure/container-apps-deploy-action@v2 + with: + appSourcePath: ${{ github.workspace }} + registryUrl: docker.io + registryUsername: ${{ secrets.AVENTUS_REGISTRY_USERNAME }} + registryPassword: ${{ secrets.AVENTUS_REGISTRY_PASSWORD }} + containerAppName: aventus + resourceGroup: MyProjects + imageToBuild: p1utoze/aventus:${{ github.sha }} + _buildArgumentsKey_: | + _buildArgumentsValues_ + +