Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
cloud-lightning

GitHub Action

Run and post run Action

v1.0.0

Run and post run Action

cloud-lightning

Run and post run Action

A simple GitHub action that allows you to execute commands on place and in post-run, once a workflow job has ended

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run and post run Action

uses: gacts/[email protected]

Learn more about this action in gacts/run-and-post-run

Choose a version

Run and post run Action

Release version Build Status License

A simple GitHub action that allows you to execute commands on place and in post-run, once a workflow job has ended.

Linked GitHub issue.

Usage

jobs:
  run-some-action:
    name: Run action
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3

      - name: Run this action
        uses: gacts/run-and-post-run@v1
        with:
          run: echo "First run"
          post: echo "First post"

      - name: Run this action with only post
        uses: gacts/run-and-post-run@v1
        with:
          post: echo "Second post"

This above configuration will produce the following:

CI output example

Customizing

Inputs

Following inputs can be used as step.with keys:

Name Type Default Required Description
run string no A command that needs to be run in place.
post string no A command 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.

Releasing

New versions releasing scenario:

  • Make required changes in the changelog file
  • Build the action distribution (make build or yarn build)
  • Commit and push changes (including dist directory changes - this is important) into the main branch
  • Publish new release using repo releases page (git tag should follow vX.Y.Z format)

Major and minor git tags (v1 and v1.2 if you publish v1.2.Z release) will be updated automatically.

Support

Issues Issues

If you find any action errors, please, make an issue in the current repository.

License

This is open-sourced software licensed under the MIT License.