Skip to content

Commit cfe9903

Browse files
committed
ci: Add workflow to mirror fixture container images to ghcr.io
The digest stability tests in PR #255 reference pinned container images from upstream registries (registry.access.redhat.com, quay.io). This job makes it easy for us to mirror fixture images to our own namespace, just to double check they don't get GC'd. Ref: #255 (comment) Assisted-by: OpenCode (Claude Opus 4) Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 76fcd9a commit cfe9903

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Mirror CI fixture images
2+
3+
# Copies pinned container images listed in ci/fixture-images.txt to
4+
# ghcr.io/composefs/ci-fixture-* so CI tests don't depend on upstream
5+
# registries keeping old builds around forever.
6+
7+
on:
8+
push:
9+
branches: [main]
10+
paths:
11+
- ci/fixture-images.txt
12+
- .github/workflows/mirror-fixture-images.yml
13+
workflow_dispatch: {} # allow manual trigger
14+
15+
permissions:
16+
packages: write
17+
18+
jobs:
19+
mirror:
20+
name: Mirror images to ghcr.io
21+
runs-on: ubuntu-24.04
22+
timeout-minutes: 30
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Log in to ghcr.io
27+
run: echo "${{ secrets.GITHUB_TOKEN }}" | skopeo login ghcr.io -u "${{ github.actor }}" --password-stdin
28+
29+
- name: Copy images
30+
run: |
31+
set -euo pipefail
32+
copied=0
33+
while read -r src dst rest; do
34+
echo "::group::Copying $src -> $dst"
35+
skopeo copy --all "$src" "$dst"
36+
echo "::endgroup::"
37+
copied=$((copied + 1))
38+
done < <(grep -v '^\s*#' ci/fixture-images.txt | grep -v '^\s*$')
39+
echo "Mirrored $copied image(s)."

ci/fixture-images.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Container images mirrored to ghcr.io/composefs for CI fixture use.
2+
#
3+
# These images are pinned by digest or immutable tag and used in tests
4+
# (e.g. EROFS digest stability tests). Mirroring them under our own
5+
# namespace ensures they remain available even if the upstream registry
6+
# garbage-collects old builds.
7+
#
8+
# Format: <source> <destination>
9+
# Lines starting with # and blank lines are ignored.
10+
# The workflow uses `skopeo copy --all` to preserve multi-arch manifests.
11+
12+
# RHEL UBI 10.1, build 1772441712 (amd64).
13+
# Used in: crates/integration-tests/src/tests/digest_stability.rs
14+
docker://registry.access.redhat.com/ubi10/ubi:10.1-1772441712 docker://ghcr.io/composefs/ci-fixture-ubi10:10.1-1772441712
15+
16+
# centos-bootc stream10, pinned by manifest digest.
17+
# Used in: crates/integration-tests/src/tests/digest_stability.rs
18+
docker://quay.io/centos-bootc/centos-bootc@sha256:d1913e3d616b9acb7fc2e3331be8baf844048bca2681a23d34e53e75eb18f3d0 docker://ghcr.io/composefs/ci-fixture-centos-bootc:stream10-d1913e3d

0 commit comments

Comments
 (0)