A simple GitHub action that enables running post-run steps, once a workflow job has ended.
Required A command that needs to be run. Default echo "This is a post-run step..."
.
Latest version: 3.1.0
name: Build
on:
push:
branches: [ master ]
jobs:
something:
name: Do something...
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: lisanna-dettwyler/[email protected]
with:
run: echo "this thing works!"
- uses: lisanna-dettwyler/[email protected]
with:
run: |
echo "multi-line"
echo "is supported"
# working-directory: not-required-but-you-can-provide-it
- name: Job fails
run: false
- uses: lisanna-dettwyler/action-post-run/[email protected]
with:
run: echo "this only runs if the job succeeded (post-if: 'success()'"
name: Build
on:
push:
branches: [ master ]
jobs:
something:
name: Do something...
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: actions-post-run example
uses: lisanna-dettwyler/[email protected]
with:
run: echo "this thing works!"
- name: actions-post-run multiline example
uses: lisanna-dettwyler/[email protected]
with:
run: |
echo "multi-line"
echo "is supported"
# working-directory: not-required-but-you-can-provide-it
- name: Job fails
run: false
- name: actions-post-run/success example
uses: lisanna-dettwyler/action-post-run/[email protected]
with:
run: |
echo "this only runs if the job succeeded (post-if: 'success()'"
This above configuration will produce the following:
Note Note the order of execution. The multiline example was executed before the first example.