Create ACA revision #139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Create ACA revision | |
| on: | |
| workflow_run: | |
| workflows: | |
| - Build and push API as container | |
| types: | |
| - completed | |
| env: | |
| AZURE_CORE_OUTPUT: none | |
| RESOURCE_GROUP: containering | |
| APP_NAME: app | |
| jobs: | |
| create-revision: | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| environment: prod | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Login to Azure | |
| uses: azure/login@v3 | |
| with: | |
| client-id: ${{ vars.APP_AZURE_CLIENT_ID }} | |
| tenant-id: ${{ vars.APP_AZURE_TENANT_ID }} | |
| subscription-id: ${{ vars.APP_AZURE_SUBSCRIPTION_ID }} | |
| - name: Create Container App revision | |
| uses: azure/cli@v3 | |
| with: | |
| inlineScript: | | |
| az containerapp revision copy \ | |
| --subscription "${{ vars.APP_AZURE_SUBSCRIPTION_ID }}" \ | |
| --resource-group "${{ env.RESOURCE_GROUP }}" \ | |
| --name "${{ env.APP_NAME }}" \ | |
| --revision-suffix "gha-${{ github.run_id }}-${{ github.run_attempt }}" |