Skip to content

MON-196408 [CI] Use ghcr.io (github containers) to store fat containe…#6109

Open
Tpo76 wants to merge 1 commit intodevelopfrom
MON-196408-ci-use-ghcr-io-github-containers-to-store-fat-containers-from-pipelines
Open

MON-196408 [CI] Use ghcr.io (github containers) to store fat containe…#6109
Tpo76 wants to merge 1 commit intodevelopfrom
MON-196408-ci-use-ghcr-io-github-containers-to-store-fat-containers-from-pipelines

Conversation

@Tpo76
Copy link
Copy Markdown
Contributor

@Tpo76 Tpo76 commented Apr 8, 2026

Context

GitHub Actions cache limits are hit fast due to very large Docker images being saved as cache artifacts, leading to broken runs and frustration for anyone using the pipelines.

Changes

Replaced the docker save → cache/save / cache/restore → docker load pattern with a direct push/pull to ghcr.io for the following workflows:

perl-cpan-libraries.yml

  • get-packaging-images job: pull from Harbor → tag → push to ghcr.io
  • package-rpm / package-deb jobs: pull directly from ghcr.io (no cache restore, no docker load)

plugins-robot-tests.yml

  • Renamed test-image-to-cachepush-test-image-to-ghcr
  • Same pattern: pull from Harbor → tag → push to ghcr.io
  • robot-test job: pull directly from ghcr.io

Image naming

ghcr.io/${{ github.repository }}/<image>:<sha>-<run_id> — same uniqueness as the previous cache key, maintaining run isolation.

Auth

Uses GITHUB_TOKEN with packages: write — no extra secret or PAT needed, consistent with MON-196690.

Follow-up

Ephemeral images tagged with sha-run_id will accumulate in ghcr.io. A cleanup mechanism (similar to cleanup-ghcr-registry.yml in delivery-tooling) should be added as a
follow-up.

Related

  • MON-196408
  • MON-196690 (phase 1 — same approach validated for centreon/centreon-collect, centreon/centreon, centreon/centreon-modules)

Summary by Aikido

Security Issues: 0 Quality Issues: 0 Resolved Issues: 0

⚡ Enhancements

  • Replaced cache-based image storage with ghcr.io push/pull across workflows
  • Added Docker login to ghcr.io using GITHUB_TOKEN for registry access
  • Tagged ephemeral images with sha-run_id to preserve run-specific uniqueness
  • Added packages: write permissions so workflows could push images to ghcr

🔧 Refactors

  • Renamed test-image-to-cache job to push-test-image-to-ghcr and simplified logic

More info

@Tpo76 Tpo76 requested a review from a team as a code owner April 8, 2026 16:16
@Tpo76 Tpo76 requested review from mushroomempires and tuntoja April 8, 2026 16:16
@Tpo76 Tpo76 force-pushed the MON-196408-ci-use-ghcr-io-github-containers-to-store-fat-containers-from-pipelines branch from 7e82a94 to fbec154 Compare April 8, 2026 16:18
@Tpo76 Tpo76 force-pushed the MON-196408-ci-use-ghcr-io-github-containers-to-store-fat-containers-from-pipelines branch from fbec154 to 7e805b0 Compare April 8, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant