Skip to content

Commit

Permalink
USe regsync
Browse files Browse the repository at this point in the history
  • Loading branch information
eaudetcobello committed May 24, 2024
1 parent b33b158 commit d91f455
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/sync-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Sync registry.k8s.io to ghcr.io/canonical
env:
DEST_CREDS: ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
run: |
${GITHUB_WORKSPACE}/build-scripts/hack/skopeo-sync.sh
${GITHUB_WORKSPACE}/build-scripts/hack/regsync.sh
5 changes: 5 additions & 0 deletions build-scripts/hack/regsync-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
sync:
- source: quay.io/skopeo/stable:v1.15.0
target: ghcr.io/canonical/stable:v1.15.0
type: image
4 changes: 4 additions & 0 deletions build-scripts/hack/regsync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

go install github.com/regclient/regclient/cmd/regsync@latest
regsync once -c regsync-config.yaml
9 changes: 0 additions & 9 deletions build-scripts/hack/skopeo-sync.sh

This file was deleted.

0 comments on commit d91f455

Please sign in to comment.