Reusable workflows for use in the Fastify organization.
GitHub introduced reusable workflows on 2021-11-29 which, as the name suggests, are workflows that can be referenced across the entirety of GitHub.
For more information, including limitations, see the GitHub Docs.
A reusable workflow is called by using the uses
keyword in another workflow:
name: CI
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
call-reuseable-workflow:
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
Included in this repo is a basic workflow for use across the majority of plugins, as well as variants with service containers.
By setting the lint
option to true
when using the basic workflow the CI will first run the linter job once.
Example: running the linter job first with the basic workflow
name: CI
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
test:
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
with:
lint: true
Input Name | Required | Type | Default | Description |
---|---|---|---|---|
auto-merge-exclude |
false | string | fastify |
Provide a comma separated list of packages that you do not want to be auto-merged. |
lint |
false | boolean | false |
Set to true to run the lint script in a repository's package.json . |
This project is kindly sponsored by:
Licensed under MIT.