Skip to content

Add workflow success|failure experiment mod #6

Add workflow success|failure experiment mod

Add workflow success|failure experiment mod #6

Workflow file for this run

name: Main - explore CI primitives
on:
push:
branches:
- main
jobs:
job-1:
runs-on: ubuntu-latest
steps:

Check failure on line 12 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/main.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
- 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