Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Commit

Permalink
Another test 4
Browse files Browse the repository at this point in the history
  • Loading branch information
mstachniuk committed Nov 24, 2020
1 parent f0c28bc commit bc49375
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/fail-safe-check-job-should-success-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,26 @@ on:
jobs:
init:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.ci-skip-step.outputs.ci-skip }}
skip-not: ${{ steps.ci-skip-step.outputs.ci-skip-not }}
steps:
- uses: actions/checkout@v2
with:
# Contains Add Readme in message subject
ref: '84841e1cb19c7cf14edeb0b0041cead83ed2d8c7'
fetch-depth: 0
- id: init-id
- id: ci-skip-step
uses: mstachniuk/ci-skip@tag-for-test

# this job should NOT be skipped
main_job:
needs: init
if: ${{ needs.init-id.outputs.ci-skip-aaaa == 'false' }}
if: ${{ needs.init.outputs.skip == 'false' }}
runs-on: ubuntu-latest
steps:
- run: |
echo "Output ci-skip: ${{ needs.init.outputs.ci-skip }}"
echo "Output ci-skip-not: ${{ needs.init.outputs.ci-skip-not }}"
echo "Output ci-skip: ${{ needs.init.outputs.skip }}"
echo "Output ci-skip-not: ${{ needs.init.outputs.skip-not }}"
echo "The main_job should NOT be skipped"
exit 0
12 changes: 8 additions & 4 deletions .github/workflows/fail-safe-check-job-should-success.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@ on:
jobs:
init:
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.ci-skip-step.outputs.ci-skip }}
skip-not: ${{ steps.ci-skip-step.outputs.ci-skip-not }}
steps:
- uses: actions/checkout@v2
with:
# Contains [ci skip] in message body in merge commit
ref: '0928dd4ccbb9a9d5e39791011e1ec5792c495848'
fetch-depth: 0
- uses: mstachniuk/ci-skip@tag-for-test
- id: ci-skip-step
uses: mstachniuk/ci-skip@tag-for-test

# this job should be skipped
main_job:
needs: init
if: ${{ needs.init.outputs.ci-skip == 'false' }}
if: ${{ needs.init.outputs.skip == 'false' }}
runs-on: ubuntu-latest
steps:
- run: |
echo "Output ci-skip: ${{ needs.init.outputs.ci-skip }}"
echo "Output ci-skip-not: ${{ needs.init.outputs.ci-skip-not }}"
echo "Output ci-skip: ${{ needs.init.outputs.skip }}"
echo "Output ci-skip-not: ${{ needs.init.outputs.skip-not }}"
echo "The main_job should be skipped"
exit 1

0 comments on commit bc49375

Please sign in to comment.