Repository of plus3it reusable worfklows for GitHub Actions.
This project publishes reusable workflows for the Plus3IT organization. All reusable workflows are located in the directory .github/workflows.
The release logic is also available as a composite action. Only difference is that the action does not execute the lint and test workflows.
Any workflow file that is not prefixed with local- is provided as a reusable
workflow. The local- workflow files are the workflows in use by this project,
themselves using the reusable workflows. The local- workflows are also examples
of how the reusable workflows are expected to be invoked.
Inputs:
tardigradelint-target: Controls which tardigrade-ci Makefile target to run. Defaults tolint.
An example of calling the reusable lint workflow:
name: Run lint and static analyis checks
on:
pull_request:
# Cancel other lint workflows when source is updated
concurrency:
group: lint-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint:
uses: plus3it/actions-workflows/.github/workflows/lint.yml@v1
Inputs:
mockstacktest-enable: Controls whether to run the mockstacktest job. Defaults totrue.
An example of calling the reusable test workflow:
name: Run test jobs
on:
pull_request:
# Cancel other test workflows when source is updated
concurrency:
group: test-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
test:
uses: plus3it/actions-workflows/.github/workflows/test.yml@v1
Inputs:
mockstacktest-enable: Controls whether to run the mockstacktest job. Defaults totrue.
Secrets:
release-token: Required. Token with permissions to create GitHub Releases.
An example of calling the reusable release workflow:
name: Create GitHub Release
on:
# Run on demand
workflow_dispatch:
# Run on push to main when .bumpversion.cfg version is updated
push:
branches:
- main
paths:
- .bumpversion.cfg
jobs:
release:
uses: plus3it/actions-workflows/.github/workflows/release.yml@v1
secrets:
release-token: ${{ secrets.GH_RELEASES_TOKEN }}
An example of using the composite release action:
name: Create GitHub Release
on:
# Run on demand
workflow_dispatch:
# Run on push to main when .bumpversion.cfg version is updated
push:
branches:
- main
paths:
- .bumpversion.cfg
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: plus3it/actions-workflows/.github/actions/release@v1
with:
release-token: ${{ secrets.GH_RELEASES_TOKEN }}