From c829cd90a087c8916526dba3b7e1e83ec8928cdb Mon Sep 17 00:00:00 2001 From: Dimitri Huisman <52963853+Diman0@users.noreply.github.com> Date: Tue, 28 Mar 2023 21:02:57 +0200 Subject: [PATCH] Adapt mirror.yml that it can only be run manually When starting it manually, you can provide the tag that must be synchronised --- .github/workflows/mirror.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/mirror.yml b/.github/workflows/mirror.yml index ba0b6326..6d72f927 100644 --- a/.github/workflows/mirror.yml +++ b/.github/workflows/mirror.yml @@ -6,21 +6,16 @@ name: mirror-images on: workflow_dispatch: - schedule: - # * is a special character in YAML so you have to quote this string - # Mirror (copy) the image every day at 03:00h - # m h dom mon dow - - cron: '0 3 * * *' + inputs: + tag: + description: 'The tag of the docker.io/alpine image that is mirrored as ghcr.io/mailu/alpine' + required: true + type: string jobs: # mirror alpine image mirror-image-alpine: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - #list of tags to mirror, update this to sync a different alpine tag - tag: ["3.17.2"] steps: - name: Helper to convert docker org to lowercase id: string @@ -31,7 +26,7 @@ jobs: shell: bash env: DOCKER_ORG: ghcr.io/${{ steps.string.outputs.lowercase }} - TAG: ${{ matrix.tag }} + TAG: ${{ inputs.tag }} run: | set -euxo pipefail \ ; echo "${{ github.token }}" | docker login --username "${{ github.repository_owner }}" --password-stdin ghcr.io \