Files
homelab-frontend/.forgejo/workflows/ci.yaml
T
Story Crater Bot d3a9d3966c ci: split workflows into ci.yaml (verify) and build.yaml (push)
- ci.yaml: vet, test, govulncheck only
- build.yaml: build and push to registry with commit short SHA tag
- No manifest write-back, no git push from CI
- Enabled by Stage 1 (B, C1)
2026-08-20 21:30:40 -07:00

37 lines
940 B
YAML

# Forgejo Actions CI — verification only (vet, test, build).
# Build and push happens in build.yaml on main push.
# Note: Forgejo reads .forgejo/workflows/, not .github/workflows/.
# runs-on: docker matches the only label the cluster runner declares.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
verify:
name: Test, vet, build
runs-on: docker
container:
image: golang:1.25-bookworm
steps:
- uses: actions/checkout@v4
- name: go vet
run: go vet ./...
# The race detector needs cgo, so this cannot run with CGO_ENABLED=0.
- name: go test -race
run: go test ./... -race
- name: Static build
run: CGO_ENABLED=0 go build -trimpath -o gateway ./cmd/gateway
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
continue-on-error: true