Reuseable GitHub Actions Workflows
name: On Push
on:
push:
branches:
- main
- "[0-9]+.x"
tags:
- "*"
jobs:
typical-workflow:
name: Lint, format, test and build
uses: bjerkio/workflows/.github/workflows/pnpm-typical.yml@v2You can set use-engines: true to use "engines" from package.json for Node version.
See pnpm-typical.yml for more details.
name: On Push
on:
push:
branches:
- main
- "[0-9]+.x"
tags:
- "*"
jobs:
typical-workflow:
name: Lint, format, test and build
uses: bjerkio/workflows/.github/workflows/bun-typical.yml@v2See bun-typical.yml for more details.
Note: Bun does not currently support --if-present, so you need to make sure that the scripts lint, format, test and build are present in package.json.
If you are not using all of them, they can be skipped by adding a exit 0 command
to "scripts".
Example:
{ // ... "scripts": { "build": "echo 'not implemented'; exit 0;", "lint": "echo 'not implemented'; exit 0;", "format": "echo 'not implemented'; exit 0;", "test": "echo 'not implemented'; exit 0;" } }