1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-06-02 23:17:26 +02:00

Adapt mirror.yml that it can only be run manually

When starting it manually, you can provide the tag that must be synchronised
This commit is contained in:
Dimitri Huisman 2023-03-28 21:02:57 +02:00 committed by GitHub
parent 250a200edb
commit c829cd90a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 \