Add workflow success|failure experiment mod #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main - explore CI primitives | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
job-1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: step-1 from job-1 | ||
run: | ||
echo Hello from job-1, step-1 | ||
#exit 42 | ||
exit 1 | ||
- name: step-2 from job-1 | ||
# if: ${{ success() || failure() }} | ||
run: | ||
echo Hello from job-1, step-1 | ||
job-2: | ||
runs-on: ubuntu-latest | ||
needs: [ job-1 ] | ||
steps: | ||
- name: step-1 from job-2 | ||
run: | ||
echo Hello from job-2, step-1 | ||
- name: step-2 from job-2 | ||
run: | ||
echo Hello from job-2, step-2 | ||
# plain exit-42 on job-1,step-1 and success()||failure() on job-1,step-2 means job-2 DOES run | ||
# plain exit-42 on job-1,step-1 and NO success()||failure() on job-1,step-2 means job-1,step-2 DOES run, job-2 DOES run |