GitHub Action
Run and post run Action
v1.4.1
Latest version
A simple GitHub action that allows you to execute commands on place and in post-run, once a workflow job has ended.
jobs:
run-some-action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run this action
uses: gacts/run-and-post-run@v1
with:
run: echo "First"
"(can be multiline)"
post: |
echo "First post"
echo "(can run multiply commands)"
ls -la /tmp \
/bin /opt
- name: Post command only
uses: gacts/run-and-post-run@v1
with:
post: echo "Second post"
This above configuration will produce the following:
The following inputs can be used as step.with
keys:
Name | Type | Default | Required | Description |
---|---|---|---|---|
run |
string or list |
no | A commands that needs to be run in place | |
post |
string or list |
yes | A commands that needs to be run once a workflow job has ended | |
working-directory |
string |
no | A working directory from which the command needs to be run | |
shell |
string |
bash |
no | A shell to use for executing run commands |
post-shell |
string |
no | A shell to use for executing post commands. Defaults to value of shell |
To release a new version:
- Build the action distribution (
make build
ornpm run build
). - Commit and push changes (including
dist
directory changes - this is important) to themaster|main
branch. - Publish the new release using the repo releases page (the git tag should follow the
vX.Y.Z
format).
Major and minor git tags (v1
and v1.2
if you publish a v1.2.Z
release) will be updated automatically.
If you find any errors in the action, please create an issue in this repository.
This is open-source software licensed under the MIT License.