Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Mirror Docker images #277

Mirror Docker images

Mirror Docker images #277

Workflow file for this run

name: Mirror Dockerhub
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
mirror:
name: Mirror
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: aws-observability/aws-for-fluent-bit
repo: public.ecr.aws
- image: alpine
repo: docker.io
- image: busybox
repo: docker.io
- image: golang
repo: docker.io
- image: moby/buildkit
repo: docker.io
- image: nginx
repo: docker.io
- image: node
repo: docker.io
- image: python
repo: docker.io
- image: rancher/klipper-lb
repo: docker.io
- image: registry
repo: docker.io
- image: tonistiigi/binfmt
repo: docker.io
- image: ubuntu
repo: docker.io
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v4
- uses: imjasonh/setup-crane@v0.3
- name: Mirror
run: |
for tag in $(cat ./images/${{ matrix.image }}); do
crane copy \
${{ matrix.repo }}/${{ matrix.image }}:$tag \
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ matrix.image }}:$tag
done