Loading...
Loading...
Conventions for authoring and maintaining GitHub Actions workflows. Pin each action to its latest version, read the Node version from .node-version (else latest LTS), and set up pnpm via the setup-pnpm action instead of corepack. Use when creating a workflow, adding or editing jobs or steps, or updating action versions in an existing workflow.
npx skill4agent add sudokoi/skills github-workflowactions/checkout@v7gh api repos/OWNER/REPO/releases/latest --jq .tag_name| Action | Latest |
|---|---|
| actions/checkout | v7 |
| actions/setup-node | v7 |
| actions/setup-python | v7 |
| actions/cache | v6 |
| actions/upload-artifact | v7 |
| actions/download-artifact | v8 |
| pnpm/action-setup | v6 |
.node-version.nvmrcnode-version-filenode-version: 'lts/*'pnpm/action-setupcorepackpnpm/action-setuppackageManagerpackage.jsonpackage.jsonversion: latestname: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
# version is read from package.json "packageManager"; no hardcoding
- uses: actions/setup-node@v7
with:
node-version-file: '.node-version' # or: node-version: 'lts/*'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm test