Skip to content

Commit 0228d0f

Browse files
committed
Split build and deploy to distinct jobs
1 parent ea3a5de commit 0228d0f

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
group: ${{ github.workflow }}-${{ github.ref }}
2222
cancel-in-progress: true
2323
jobs:
24-
deploy:
24+
build:
2525
runs-on: ubuntu-latest
2626
environment: Azure
2727
permissions:
@@ -51,15 +51,22 @@ jobs:
5151
env:
5252
DOCKER_BUILD_SUMMARY: false
5353
DOCKER_BUILD_RECORD_UPLOAD: false
54+
deploy:
55+
runs-on: ubuntu-latest
56+
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
57+
needs: build
58+
environment: Azure
59+
permissions:
60+
id-token: write
61+
contents: read
62+
steps:
5463
- name: Azure login
55-
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
5664
uses: azure/login@v2
5765
with:
5866
client-id: ${{ secrets.AZURE_CLIENT_ID }}
5967
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
6068
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
6169
- name: Deploy
62-
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
6370
uses: azure/container-apps-deploy-action@v2
6471
with:
6572
resourceGroup: ${{ vars.RESOURCE_GROUP_NAME}}

0 commit comments

Comments
 (0)