Loading...
Generate a GitHub Actions CI workflow from a form — Node, Python, Go, or Rust with a version matrix, or a multi-arch Docker build-and-push to GHCR/Docker Hub.
Assumes matching lint/test/build scripts in package.json.
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run test
- run: npm run build
Commit this to .github/workflows/ in your repo.