From a7fc9054902f41d31bb0cf0a79dee871b4bb07e6 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 14 Apr 2026 22:26:23 +0200 Subject: [PATCH] ci: Run mirror-images less often Run it once a night for regular cleanup etc and after each release-image workflow instead of doing it blindly every 2 hours. This will only run the mirror job if BOTH build types were successful, but it is better than nothing, and we have the nightly run to pick up everything else. Thanks @jade for the quick feedback and hand-holding in creating this. --- .forgejo/workflows/mirror-images.yml | 7 +++++-- .forgejo/workflows/release-image.yml | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/mirror-images.yml b/.forgejo/workflows/mirror-images.yml index 6b9a56a09..1f6334e48 100644 --- a/.forgejo/workflows/mirror-images.yml +++ b/.forgejo/workflows/mirror-images.yml @@ -2,8 +2,11 @@ name: Mirror Container Images on: schedule: - # Run every 2 hours - - cron: "0 */2 * * *" + # Run nightly + - cron: "25 2 * * *" + + workflow_call: + workflow_dispatch: inputs: dry_run: diff --git a/.forgejo/workflows/release-image.yml b/.forgejo/workflows/release-image.yml index 108e0388e..3c6e333b1 100644 --- a/.forgejo/workflows/release-image.yml +++ b/.forgejo/workflows/release-image.yml @@ -195,3 +195,10 @@ jobs: images: ${{ env.IMAGE_PATH }} registry_user: ${{ vars.BUILTIN_REGISTRY_USER || github.actor }} registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }} + + mirror_images: + needs: + - merge-maxperf + - merge-release + runs-on: ubuntu-latest + uses: ./.forgejo/workflows/mirror-images.yml