Runs on every push and pull request. Single job on ubuntu-latest:
- Build —
go build -v ./... - Test —
go testacross all non-vendor packages - Vet —
go vetacross all non-vendor packages - staticcheck — static analysis via
dominikh/staticcheck-action - gosec — security scanner via
securego/gosec
Go version is stable with check-latest: true, so CI always uses the latest released Go.
Triggers when a GitHub release is created. Builds cross-platform binaries (linux/amd64, linux/arm64, windows/amd64, darwin/amd64, darwin/arm64) with the release tag embedded via -ldflags, then uploads each binary and its SHA1 checksum as release assets.
Uses go-version: stable — artifacts are always built with the latest Go at release time.
Runs CodeQL analysis for Go on pushes and PRs to main, plus a weekly schedule (Tuesdays 23:40 UTC). Catches security vulnerabilities and coding errors.
Triggers on pull_request_target for PRs opened by dependabot[bot]. Uses dependabot/fetch-metadata to classify the version bump, then enables auto-merge (rebase strategy) for patch and minor updates only. Major version bumps are left for manual review.
Auto-merge is gated by branch protection — the PR won't actually merge until the test and Analyze (go) status checks pass.
Security note: This workflow deliberately does not check out PR code. It only reads dependabot metadata and calls
gh pr merge. A comment at the top of the file explains why — do not add a checkout step without understanding thepull_request_targetsecurity model.
Runs daily at 14:00 UTC (plus manual workflow_dispatch). Checks go.dev/dl/?mode=json for the latest stable Go release and compares it to the toolchain directive in go.mod. If they differ:
- Creates branch
auto/bump-go-toolchain-<version> - Runs
go mod edit -toolchain=go<version>+go mod tidy - Opens a PR and enables auto-merge (rebase)
Idempotent — if the branch already exists from a prior run, the workflow exits cleanly. The go X.Y minimum-version directive in go.mod is intentionally left alone; only the toolchain line floats.
| What | How | Frequency |
|---|---|---|
| Go modules | Dependabot | Weekly PRs, patch/minor auto-merged |
| GitHub Action pins | Dependabot | Weekly PRs, patch/minor auto-merged |
Go toolchain in go.mod |
go-version-bump.yml |
Daily check, PR when new stable ships |
| Go in CI runners | go-version: stable |
Always latest (no pin to manage) |
main requires the following checks before merge:
test— build, test, vet, staticcheck, gosecAnalyze (go)— CodeQL security analysis
Auto-merge is enabled. PRs queued with gh pr merge --auto --rebase will merge only after both checks pass.
dependabot.yml— Dependabot config forgomodandgithub-actionsecosystems, targetingmain, weekly cadenceworkflows/test.yml— PR checksworkflows/release.yml— Release artifact builderworkflows/codeql-analysis.yml— CodeQL security scanningworkflows/dependabot-auto-merge.yml— Dependabot auto-merge logicworkflows/go-version-bump.yml— Go toolchain auto-bump