Skip to content

Add CI: PR checks and versioned publish to GHCR - #1

Merged
ngpayyappilly merged 1 commit into
mainfrom
ci/pr-checks-and-publish
Nov 12, 2026
Merged

ngpayyappilly merged 1 commit into
mainfrom
ci/pr-checks-and-publish

Conversation

@ngpayyappilly

Copy link
Copy Markdown
Owner

Summary

  • pr.yml runs on PRs to main: hadolint, shellcheck and actionlint, then builds the image on native amd64 and arm64 runners and runs a smoke test. Nothing is pushed.
  • publish.yml runs on pushes to main and on v*.*.* tags. It builds linux/amd64,linux/arm64, pushes to ghcr.io/ngpayyappilly/k8s-debug, and attaches provenance and SBOM.
    • Tag v1.2.3 gives 1.2.3, 1.2, 1 and latest.
    • Pre-release tags like v1.3.0-rc.1 give only that tag.
    • main gives edge and sha-<short>.
  • scripts/smoke-test.sh checks that every advertised tool exists, that the pinned binaries run, and that the bashrc loads. It can also be run locally.
  • Dockerfile: set pipefail, so a failed curl in a curl | tar step fails the build instead of silently producing a broken image (hadolint DL4006).

Test plan

  • hadolint is clean locally, with DL3008 ignored in .hadolint.yaml
  • Built the image on arm64 and ran the smoke test: passed
  • Both workflow files parse as YAML
  • CI on this PR is green on both amd64 and arm64
  • After merge, the edge image appears at ghcr.io. Then push v0.1.0 and check the tags.

Notes

  • publish.yml only runs after merge, so it can't be exercised by this PR. The first run on main is the real test.
  • The GHCR package is private by default. Make it public, or add a pull secret, after the first publish.
  • The arm64 job relies on the free ubuntu-24.04-arm runners (public repos).

🤖 Generated with Claude Code

- pr.yml: hadolint, shellcheck, actionlint, then native amd64 + arm64
  build and smoke test on every PR (nothing pushed)
- publish.yml: multi-arch build pushed to ghcr.io; semver tags from
  git tags (X.Y.Z, X.Y, X, latest), edge + sha-<short> on main
- scripts/smoke-test.sh: verifies all advertised tools exist and the
  pinned binaries execute
- Dockerfile: set pipefail so a failed curl in `curl | tar` fails the build

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ngpayyappilly
ngpayyappilly merged commit de7c0fe into main Nov 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant