Skip to content

Repository files navigation

Workflows

GitHub releaseOSSF Scorecard

Reusable workflows for use in the Fastify organization.

Intro

GitHub introduced reusable workflows on 2021-11-29 which, as the name suggests, are workflows that can be referenced across the entirety of GitHub. A reusable workflow is called by using the uses keyword in another workflow.

For more information, including limitations, see the GitHub Docs.

CI workflows

Usage

name: CIon:
push:
branches:
- main
- next
- 'v*'paths-ignore:
- 'docs/**'
- '*.md'pull_request:
paths-ignore:
- 'docs/**'
- '*.md'permissions:
contents: readjobs:
test:
permissions:
contents: writepull-requests: writeuses: fastify/workflows/.github/workflows/plugins-ci.yml@v5

Included in this repo is a basic workflow for use across the majority of plugins, as well as variants with service containers.

Enable workflow Linter job

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: CIon:
push:
branches:
- main
- next
- 'v*'paths-ignore:
- 'docs/**'
- '*.md'pull_request:
paths-ignore:
- 'docs/**'
- '*.md'permissions:
contents: readjobs:
test:
permissions:
contents: writepull-requests: writeuses: fastify/workflows/.github/workflows/plugins-ci.yml@v5with:
lint: true

Inputs

Input NameRequiredTypeDefaultDescription
auto-merge-excludefalsestringfastifyProvide a semicolon separated list of packages that you do not want to be auto-merged.
fastify-dependency-integrationfalsebooleanfalseSet to true to run fastify tests with the (proposed) changes.
license-checkfalsebooleanfalseSet to true to check that a repository's production dependencies use permissive licenses: 0BSD, Apache-2.0, BSD-2-Clause, BSD-3-Clause, MIT, or ISC.
license-check-allowed-additionalfalsestringProvide a semicolon separated list of SPDX-license identifiers that you want to additionally allow.
lintfalsebooleanfalseSet to true to run the lint script in a repository's package.json.
node-versionsfalsestring'["20", "22", "24", "26"]'Provide A JSON array that specifies the Node.js versions on which the job should run.

Acknowledgments

Past sponsors:

Contributing

Contributions are welcome, and any help is greatly appreciated!

See the contributing guide for details on how to get started. Please adhere to Fastify's Code of Conduct when contributing.

License

Licensed under MIT.

About

Reusable workflows for use in the Fastify organization

Resources

Code of conduct

Contributing

Security policy

Stars

15 stars

Watchers

13 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors