Skip to content

Commit

Permalink
Add condition example (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
jetexe authored Sep 9, 2024
1 parent 32b245a commit f5eb431
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,9 @@ jobs:
shell: sh
post: if [ "$0" = "/usr/bin/bash" ]; then echo "Test passed"; else exit 1; fi
post-shell: bash

- name: Post run condition
uses: ./
with:
run: echo "Use job.status variable to check the job status (success, failure or cancelled)"
post: if [ "${{ job.status }}" = "success" ]; then echo "Test passed"; else exit 1; fi
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ This above configuration will produce the following:
![CI output example](https://github.com/gacts/run-and-post-run/assets/7326800/a73d2138-c773-494a-9922-2ae182ba87d5)
More examples can be found in the [tests](./.github/workflows/tests.yml).
## Customizing
### Inputs
Expand Down

0 comments on commit f5eb431

Please sign in to comment.