Skip to content

Commit 1d1c76c

Browse files
committed
update pipeline
1 parent 1339a8a commit 1d1c76c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/pipeline.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request:
99
branches:
1010
- main
11+
release:
12+
types:
13+
- released
1114

1215
env:
1316
PIPELINE_USER_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -313,7 +316,7 @@ jobs:
313316
# trigger the integration tests here
314317
315318
load-gamma-matrix2:
316-
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
319+
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}
317320
needs: [ integration-test ]
318321
runs-on: ubuntu-latest
319322
outputs:
@@ -324,7 +327,7 @@ jobs:
324327
run: echo "::set-output name=matrix::{\"include\":$(jq -r tostring .github/workflows/gamma.json)}"
325328

326329
deploy-gamma:
327-
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
330+
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'release' }}
328331
needs: [load-gamma-matrix2]
329332
runs-on: ubuntu-latest
330333
strategy:
@@ -377,7 +380,7 @@ jobs:
377380
--role-arn ${{ matrix.cloudformation_execution_role }}
378381
379382
load-prod-matrix2:
380-
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
383+
if: ${{ github.event_name == 'release' }}
381384
needs: [ deploy-gamma ]
382385
runs-on: ubuntu-latest
383386
outputs:
@@ -388,7 +391,7 @@ jobs:
388391
run: echo "::set-output name=matrix::{\"include\":$(jq -r tostring .github/workflows/prod.json)}"
389392

390393
deploy-prod:
391-
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
394+
if: ${{ github.event_name == 'release' }}
392395
needs: [load-prod-matrix2]
393396
runs-on: ubuntu-latest
394397
environment: prod

0 commit comments

Comments
 (0)