I have the following GitHub Actions workflow:
name: "CI Fork and Util tests"
on:
schedule:
- cron: "0 3 * * 1,3,5" # at 3:00 AM UTC on Monday, Wednesday and Friday
jobs:
lint:
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-lint.yml@main"
build:
uses: "sablier-labs/reusable-workflows/.github/workflows/forge-build.yml@main"
test-fork:
needs: ["lint", "build"]
# ...
test-utils:
needs: ["lint", "build"]
# ...
notify-on-failure:
if: failure() # Runs only if a failure occurs in any previous jobs
runs-on: "ubuntu-latest"
steps:
# ...
It doesn’t work as expected, i.e., the notify-on-failure
job is skipped even if the build
job failed:
I suppose that this is because the previous jobs are inter-dependent. How can I make notify-on-failure
run if any of the previous jobs fails?
2