Skip to content

Mirror docker images to ghcr.io #32

Mirror docker images to ghcr.io

Mirror docker images to ghcr.io #32

Workflow file for this run

name: Mirror docker images to ghcr.io
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 2'
jobs:
mirror:
name: Mirror images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: ubuntu
tag: latest
- image: ubuntu
tag: plucky
- image: ubuntu
tag: noble
- image: ubuntu
tag: jammy
- image: ubuntu
tag: focal
- image: debian
tag: latest
- image: fedora # For tool/annocheck of ruby/ruby
tag: latest
steps:
- uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_ACCESS_TOKEN }}
- uses: actions/setup-go@v6
- run: go install github.com/google/go-containerregistry/cmd/crane@latest
- name: Mirror
run: crane copy docker.io/${{ matrix.image }}:${{ matrix.tag }} ghcr.io/ruby/${{ matrix.image }}:${{ matrix.tag }}