Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# Copyright (c) 2022 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: Mirror Container Images

on:
push:
branches: [ main ]
schedule:
- cron: 0 5 * * *

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Update packages
run: sudo apt-get -y update
- name: Install Skopeo
run: sudo apt-get -y install skopeo
- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- name: Mirror Container Images
run: ./image-mirror.sh quay.io/devfile
11 changes: 11 additions & 0 deletions image-mirror.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

DEST_ORG=$1

cat mirror_list.txt

while read -r image_repo;
do
echo "Mirroring $image_repo to $DEST_ORG"
skopeo sync --src docker --dest docker $image_repo $DEST_ORG --override-os linux
done < "mirror_list.txt"
4 changes: 4 additions & 0 deletions mirror_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
golang:latest
node:lts-slim
node:lts
composer:2.1.11