mirror of
https://github.com/Mailu/Mailu.git
synced 2025-06-08 23:46:30 +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:
parent
250a200edb
commit
c829cd90a0
17
.github/workflows/mirror.yml
vendored
17
.github/workflows/mirror.yml
vendored
@ -6,21 +6,16 @@
|
|||||||
name: mirror-images
|
name: mirror-images
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
inputs:
|
||||||
# * is a special character in YAML so you have to quote this string
|
tag:
|
||||||
# Mirror (copy) the image every day at 03:00h
|
description: 'The tag of the docker.io/alpine image that is mirrored as ghcr.io/mailu/alpine'
|
||||||
# m h dom mon dow
|
required: true
|
||||||
- cron: '0 3 * * *'
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# mirror alpine image
|
# mirror alpine image
|
||||||
mirror-image-alpine:
|
mirror-image-alpine:
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
- name: Helper to convert docker org to lowercase
|
- name: Helper to convert docker org to lowercase
|
||||||
id: string
|
id: string
|
||||||
@ -31,7 +26,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
DOCKER_ORG: ghcr.io/${{ steps.string.outputs.lowercase }}
|
DOCKER_ORG: ghcr.io/${{ steps.string.outputs.lowercase }}
|
||||||
TAG: ${{ matrix.tag }}
|
TAG: ${{ inputs.tag }}
|
||||||
run: |
|
run: |
|
||||||
set -euxo pipefail \
|
set -euxo pipefail \
|
||||||
; echo "${{ github.token }}" | docker login --username "${{ github.repository_owner }}" --password-stdin ghcr.io \
|
; echo "${{ github.token }}" | docker login --username "${{ github.repository_owner }}" --password-stdin ghcr.io \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user