setup-forgejo/testdata/example-if-fail/.forgejo/workflows/test.yml

31 lines
589 B
YAML
Raw Normal View History

2023-09-02 10:20:20 -04:00
on: [push]
jobs:
test:
runs-on: docker
steps:
- run: false
- if: failure()
run: echo IF TEST FAILURE
- if: always()
run: echo IF TEST ALWAYS
#
# This is documented in GitHub Actions and does not work in Forgejo Actions
2023-10-04 10:54:14 -04:00
# as of 3.0.1.
2023-09-02 10:20:20 -04:00
#
# If you have a chain of dependent jobs, failure() returns true if any ancestor job fails.
#
# first:
# runs-on: docker
# steps:
# - run: false
# second:
# runs-on: docker
# needs: [first]
# steps:
# - if: failure()
# run: echo IF TEST FAIL DEPENDS