Skip to content

feat: add base image mirror workflow and docs conventions#33

Merged
toddysm merged 1 commit into
mainfrom
feature/mirror-base-images
Jun 2, 2026
Merged

feat: add base image mirror workflow and docs conventions#33
toddysm merged 1 commit into
mainfrom
feature/mirror-base-images

Conversation

@toddysm
Copy link
Copy Markdown
Owner

@toddysm toddysm commented Jun 2, 2026

Adds the first image mirror GitHub Actions workflow plus a docs structure and naming conventions.

What this does

Mirrors docker.io/library/python:3.14-slim into GHCR as ghcr.io/toddysm/base/python:3.14-slim, copying only when the upstream digest changes (idempotent sync). crane copy preserves the multi-arch manifest list.

Structure (reusable workflow + caller)

  • .github/workflows/_mirror-image.yml — reusable (workflow_call) workflow holding all digest-check + copy logic.
  • .github/workflows/mirror-python.yml — thin caller: daily schedule (06:00 UTC) + workflow_dispatch (with force), passing the python-specific inputs.
  • Adding another base image later = copy the caller and change ~4 inputs.

Naming convention

  • mirror-<image>.yml for image mirrors, build-<app>.yml for app builds, leading _ for reusable workflows — so mirror and build workflows never conflict.
  • Documented in docs/contributing/workflow-naming.md.

Docs folder

Topic-based, flexible layout: docs/contributing/, docs/architecture/, docs/guides/, docs/reference/, with docs/README.md as the index.

Notes

  • Auth: GHCR via built-in GITHUB_TOKEN (packages: write); Docker Hub pulled anonymously.
  • Action pinned to a commit SHA (imjasonh/setup-crane@v0.4).

Add a reusable GitHub Actions workflow that mirrors a container image from an
upstream registry into GHCR, copying only when the upstream digest changes
(idempotent sync using crane, multi-arch preserving).

- _mirror-image.yml: reusable (workflow_call) digest-check + copy logic
- mirror-python.yml: daily caller for docker.io/library/python:3.14-slim
  -> ghcr.io/toddysm/base/python:3.14-slim, with manual force option

Also add a topic-based docs/ structure (contributing, architecture, guides,
reference) and document the workflow naming conventions that keep mirror-*
and build-* workflows separated.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a first-class GitHub Actions “image mirror” capability (reusable workflow + thin per-image caller) and introduces a topic-based docs/ structure with workflow naming conventions to keep mirror/build workflows clearly separated.

Changes:

  • Added a reusable workflow_call workflow to digest-check and mirror an upstream image into GHCR (copy only on digest change, with optional force).
  • Added a scheduled + manually triggerable mirror workflow for python:3.14-slim using the reusable workflow.
  • Added docs/ index + section READMEs and documented workflow naming/organization conventions.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/_mirror-image.yml Reusable mirror workflow implementing digest comparison + crane copy and step summaries.
.github/workflows/mirror-python.yml Caller workflow that schedules and dispatches mirroring of python:3.14-slim into GHCR.
docs/README.md Adds a docs index describing the new topic-based structure and links to key conventions.
docs/contributing/workflow-naming.md Documents mirror/build/reusable workflow naming, display names, and concurrency conventions.
docs/architecture/README.md Adds architecture docs section placeholder entrypoint.
docs/guides/README.md Adds guides docs section placeholder entrypoint.
docs/reference/README.md Adds reference docs section placeholder entrypoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@toddysm toddysm merged commit 16c4b1d into main Jun 2, 2026
1 check passed
@toddysm toddysm deleted the feature/mirror-base-images branch June 2, 2026 04:47
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.

2 participants