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 checkson:
pull_request:
# Cancel other lint workflows when source is updatedconcurrency:
group: lint-${{ github.head_ref || github.ref }}cancel-in-progress: truejobs:
lint:
uses: plus3it/actions-workflows/.github/workflows/lint.yml@v1Inputs:
mockstacktest-enable: Controls whether to run the mockstacktest job. Defaults totrue.prerelease: Marks the GitHub Release as a prerelease. Defaults tofalse.draft: Creates the GitHub Release as a draft. Defaults tofalse.
An example of calling the reusable test workflow:
name: Run test jobson:
pull_request:
# Cancel other test workflows when source is updatedconcurrency:
group: test-${{ github.head_ref || github.ref }}cancel-in-progress: truejobs:
test:
uses: plus3it/actions-workflows/.github/workflows/test.yml@v1Reusable workflow for running terrafirm integration tests in salt formula repositories. The caller workflow is responsible for defining trigger conditions (e.g., PR review comment, workflow dispatch, schedule) and specifying the test matrix. This workflow handles test execution with CodeBuild runners for a single source build.
Inputs:
source-build: Required. Source build to test (e.g., al2023, centos9stream, rhel8, rhel9, ol9).watchmaker-git-url: Watchmaker Git clone URL. Defaults tohttps://github.com/plus3it/watchmaker.git.watchmaker-git-ref: Watchmaker Git ref (branch/tag). Defaults tomain.watchmaker-common-args: Watchmaker arguments passed to terrafirm, shared by linux and windows platforms. Defaults to"-n -e dev".formula-archive-url: Optional URL for formula zip archive. If omitted, dynamically generated from event.
An example of calling the reusable test-terrafirm-integration workflow:
name: Run terrafirm integration testson:
workflow_dispatch:
inputs:
watchmaker-git-url:
description: Watchmaker git clone URLrequired: falsedefault: https://github.com/plus3it/watchmaker.gittype: stringwatchmaker-git-ref:
description: Watchmaker git refrequired: falsedefault: maintype: stringformula-archive-url:
description: Optional URL to the salt formula zip archiverequired: falsedefault: ""type: stringpull_request_review:
types: [submitted]permissions:
contents: readjobs:
integration:
if: contains(github.event.review.body, '/build') || github.event_name == 'workflow_dispatch'strategy:
fail-fast: falsematrix:
source-build:
- al2023
- centos9stream
- rhel8
- rhel9
- ol9uses: plus3it/actions-workflows/.github/workflows/test-terrafirm-integration.yml@<ref>with:
source-build: ${{ matrix.source-build }}watchmaker-git-url: ${{ github.event.inputs.watchmaker-git-url }}watchmaker-git-ref: ${{ github.event.inputs.watchmaker-git-ref }}formula-archive-url: ${{ github.event.inputs.formula-archive-url }}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 Releaseon:
# Run on demandworkflow_dispatch:
# Run on push to main when .bumpversion.cfg version is updatedpush:
branches:
- mainpaths:
- .bumpversion.cfgjobs:
release:
uses: plus3it/actions-workflows/.github/workflows/release.yml@v1secrets:
release-token: ${{ secrets.GH_RELEASES_TOKEN }}An example of using the composite release action:
Inputs:
release-files: Optional. Newline-delimited globs of assets to upload.prerelease: Optional. Marks the GitHub Release as a prerelease. Defaults tofalse.draft: Optional. Creates the GitHub Release as a draft. Defaults tofalse.release-token: Required. Token with permissions to create GitHub Releases.
name: Create GitHub Releaseon:
# Run on demandworkflow_dispatch:
# Run on push to main when .bumpversion.cfg version is updatedpush:
branches:
- mainpaths:
- .bumpversion.cfgjobs:
release:
runs-on: ubuntu-lateststeps:
- uses: plus3it/actions-workflows/.github/actions/release@v1with:
release-token: ${{ secrets.GH_RELEASES_TOKEN }}