Add GitHub Actions CI and image release (#184)

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>
This commit was merged in pull request #184.
This commit is contained in:
2026-11-20 23:31:51 +11:00
committed by BenVincent
parent 6fac114a56
commit 0be7e2250a
7 changed files with 155 additions and 49 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Daemonless ui/Dockerfile.ui: append the built ui/dist and rendered nginx conf
# onto the nginx base. Usage: scripts/ui-image.sh <repo:tag>
set -euo pipefail
# Keep in sync with the FROM in ui/Dockerfile.ui.
base=nginx:alpine@sha256:fb4658584bd9a916ffb6f6e365f97c25cfdb2923801f551ea08356e695f14ff7
base_path=${BASE_PATH:-/ui}
source_url=https://github.com/IUCLabs/artifactapi
image=$1
root=$(mktemp -d)
mkdir -p "$root/usr/share/nginx/html" "$root/etc/nginx/conf.d"
cp -r ui/dist/. "$root/usr/share/nginx/html/"
sed "s|\${BASE_PATH}|${base_path}|g" ui/nginx.conf >"$root/etc/nginx/conf.d/default.conf"
tar -C "$root" --owner=0 --group=0 --numeric-owner -cf "$root.tar" usr etc
crane mutate --platform linux/amd64 "$base" --append "$root.tar" \
--label "org.opencontainers.image.source=$source_url" -t "$image"