Skip to content

Commit c67edca

Browse files
committed
fix pipeline condition check
1 parent a70d27a commit c67edca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/pipeline.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Deployment pipeline
33
env:
44
IS_PUSH: ${{ github.event_name == 'push' }}
55
HAS_SKIP_MESSAGE: ${{ contains(join(github.event.commits.*.message), '#skip') }}
6+
SHOULD_DEPLOY: ${{ github.env.IS_PUSH == 'true' && github.env.HAS_SKIP_MESSAGE != 'true' }}
67

78
on:
89
push:
@@ -29,12 +30,12 @@ jobs:
2930
- name: Test
3031
run: npm run test
3132
- name: Deploy app
32-
if: ${{ env.IS_PUSH && !env.HAS_SKIP_MESSAGE }}
33+
if: ${{ env.SHOULD_DEPLOY == 'true' }}
3334
run: flyctl deploy --remote-only
3435
env:
3536
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
3637
tag_release:
37-
if: ${{ github.env.IS_PUSH && !github.env.HAS_SKIP_MESSAGE }}
38+
if: ${{ github.env.SHOULD_DEPLOY == 'true' }}
3839
needs: [simple_deployment_pipeline]
3940
runs-on: ubuntu-20.04
4041
steps:

0 commit comments

Comments
 (0)