0be7e2250a
Releases and CI move to GitHub Actions on the IUCLabs mirror; runners there have no Docker daemon, so images are built daemonless and published to GHCR. - Add `ci.yml`: pre-commit, go vet + golangci-lint (new issues only), tests, build, ko image check, UI build - Add `release.yml`: on `v[0-9]*` tags, push `ghcr.io/iuclabs/artifactapi-ui` (`scripts/ui-image.sh` layers `ui/dist` + nginx conf onto digest-pinned `nginx:alpine`), then `ghcr.io/iuclabs/artifactapi` via ko (distroless static nonroot, version ldflag) - Both images carry `org.opencontainers.image.source`; `latest` moves only after both `vX.Y.Z` tags exist - Pin `ui/Dockerfile.ui` to the same nginx digest - Remove the Woodpecker docker pipeline; PR pipelines stay - Add `.github/CODEOWNERS` for `@IUCLabs/maintainers` Reviewed-on: #184 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
name: ci
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: iuclabs-k8s
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version-file: go.mod
|
|
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
- run: uvx pre-commit run --all-files --show-diff-on-failure
|
|
|
|
lint:
|
|
runs-on: iuclabs-k8s
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version-file: go.mod
|
|
- run: go vet ./...
|
|
# existing findings predate this job; gate new code only
|
|
- uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
|
|
with:
|
|
version: v2.15.0
|
|
only-new-issues: true
|
|
|
|
test:
|
|
runs-on: iuclabs-k8s
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version-file: go.mod
|
|
# runner image has no C toolchain (no -race) and no docker (testcontainers tests skip)
|
|
- run: go test -count=1 ./pkg/... ./internal/...
|
|
|
|
build:
|
|
runs-on: iuclabs-k8s
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
|
with:
|
|
go-version-file: go.mod
|
|
- run: go build ./...
|
|
- run: go install github.com/google/ko@v0.19.1
|
|
- run: ko build --push=false --bare --platform linux/amd64 ./cmd/artifactapi
|
|
env:
|
|
KO_DOCKER_REPO: ghcr.io/iuclabs/artifactapi
|
|
VERSION: dev
|
|
|
|
ui:
|
|
runs-on: iuclabs-k8s
|
|
defaults:
|
|
run:
|
|
working-directory: ui
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
cache-dependency-path: ui/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run build
|
|
env:
|
|
BASE_PATH: /ui
|