Add GitHub Actions CI and image release #184

Merged
benvin merged 2 commits from benvin/github-actions into master 2026-11-20 23:31:51 +11:00
Member

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
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`
unkin-agent added 1 commit 2026-11-20 22:19:04 +11:00
Add GitHub Actions CI and ko/crane image release
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci / pre-commit (pull_request) Has been cancelled
ci / lint (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
ci / build (pull_request) Has been cancelled
ci / ui (pull_request) Has been cancelled
a33e07785e
Author
Member
  • .github/workflows/release.yml:30 — API image is pushed before npm ci && npm run build and the UI image; a UI build or push failure leaves artifactapi:<tag> + latest published with no matching UI → build the UI dist first and push UI then API (or push latest last).
  • .github/workflows/release.yml:31 — ko/crane push carries no org.opencontainers.image.source=https://github.com/IUCLabs/artifactapi label, so the ghcr packages are not linked to the repo (GITHUB_TOKEN pushes can be denied on later tags, and public visibility is not guaranteed) → add the label to both images (ko image-label flag, crane mutate --label for the UI) and make the packages public.
  • scripts/ui-image.sh:16 — -b nginx:alpine pulls from Docker Hub unauthenticated and floating; rate limits on a shared runner IP will fail the release, and the base can differ between tags → pin a tag/digest (or a mirrored base reachable on 443).
  • nit: .github/workflows/release.yml:5 — v* trigger; use v[0-9]* to match the brief/mirror.
  • nit: scripts/ui-image.sh:17 — crane tag loop runs after the versioned push, so a failure leaves a version tag without latest; acceptable only if the release is re-runnable.
- .github/workflows/release.yml:30 — API image is pushed before `npm ci && npm run build` and the UI image; a UI build or push failure leaves `artifactapi:<tag>` + `latest` published with no matching UI → build the UI dist first and push UI then API (or push `latest` last). - .github/workflows/release.yml:31 — ko/crane push carries no `org.opencontainers.image.source=https://github.com/IUCLabs/artifactapi` label, so the ghcr packages are not linked to the repo (GITHUB_TOKEN pushes can be denied on later tags, and public visibility is not guaranteed) → add the label to both images (ko image-label flag, `crane mutate --label` for the UI) and make the packages public. - scripts/ui-image.sh:16 — `-b nginx:alpine` pulls from Docker Hub unauthenticated and floating; rate limits on a shared runner IP will fail the release, and the base can differ between tags → pin a tag/digest (or a mirrored base reachable on 443). - nit: .github/workflows/release.yml:5 — `v*` trigger; use `v[0-9]*` to match the brief/mirror. - nit: scripts/ui-image.sh:17 — `crane tag` loop runs after the versioned push, so a failure leaves a version tag without `latest`; acceptable only if the release is re-runnable.
unkin-agent added 1 commit 2026-11-20 22:24:09 +11:00
ci: push UI then API, move latest last; OCI source label; pin nginx base by digest
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci / pre-commit (pull_request) Has been cancelled
ci / lint (pull_request) Has been cancelled
ci / test (pull_request) Has been cancelled
ci / build (pull_request) Has been cancelled
ci / ui (pull_request) Has been cancelled
e3a9b019c0
- Build UI dist and push the UI image before the API image, and tag
  latest on both only after both versioned tags exist.
- Label both images org.opencontainers.image.source so ghcr links the
  packages to the repo.
- Pin nginx:alpine by digest in scripts/ui-image.sh and ui/Dockerfile.ui.
- Release trigger narrowed to v[0-9]* tags.
Author
Member

No findings.

No findings.
benvin merged commit 0be7e2250a into master 2026-11-20 23:31:51 +11:00
benvin deleted branch benvin/github-actions 2026-11-20 23:31:51 +11:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#184