Skip to content

Commit

Permalink
chore: actions
Browse files Browse the repository at this point in the history
  • Loading branch information
evereq committed Nov 9, 2023
1 parent 7a29fa2 commit 5f39d96
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/mobile.before-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,16 @@ jobs:
- uses: actions/checkout@v3

- name: Cancel workflow if PR is from develop to main
- name: Skip workflow if PR is from develop to main
if: github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main'
run: |
echo "PR is from develop to main. Cancelling the workflow."
exit 78
echo "PR is from develop to main. Skipping the workflow."
echo "::set-output name=skipped::true"
id: skip_check

- name: Check if skipped
if: steps.skip_check.outputs.skipped == 'true'
run: echo "Workflow was skipped" && exit 0

- name: Use Node.js 18.x
uses: actions/setup-node@v3
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/web.before-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Cancel workflow if PR is from develop to main
- name: Skip workflow if PR is from develop to main
if: github.event.pull_request.head.ref == 'develop' && github.event.pull_request.base.ref == 'main'
run: |
echo "PR is from develop to main. Cancelling the workflow."
exit 78
echo "PR is from develop to main. Skipping the workflow."
echo "::set-output name=skipped::true"
id: skip_check

- name: Check if skipped
if: steps.skip_check.outputs.skipped == 'true'
run: echo "Workflow was skipped" && exit 0

- name: Use Node.js 18.x
uses: actions/setup-node@v3
Expand Down

0 comments on commit 5f39d96

Please sign in to comment.