From d0f0d7ba9aec32a2ef09f9b5278f891b92e18b8f Mon Sep 17 00:00:00 2001 From: eaudetcobello Date: Wed, 22 May 2024 17:58:32 -0400 Subject: [PATCH] Move to sh file --- .github/workflows/sync-registry.yaml | 17 +++++++++++------ build-scripts/hack/sync-registry.sh | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100755 build-scripts/hack/sync-registry.sh diff --git a/.github/workflows/sync-registry.yaml b/.github/workflows/sync-registry.yaml index 503ac07a5..a2a83079b 100644 --- a/.github/workflows/sync-registry.yaml +++ b/.github/workflows/sync-registry.yaml @@ -5,6 +5,13 @@ jobs: publish: runs-on: ubuntu-22.04 steps: + - name: Login to target registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout repository uses: actions/checkout@v4 @@ -13,11 +20,9 @@ jobs: with: go-version: '>=1.22' - - run: go install github.com/regclient/regclient/cmd/regsync@latest - - name: Sync registry.k8s.io to ghcr.io/canonical - env: - USERNAME: ${{ github.actor }} - TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - regsync once --config ${GITHUB_WORKSPACE}/build-scripts/hack/sync-registry.yaml + curl -L https://github.com/regclient/regclient/releases/download/v0.6.1/regsync-linux-amd64 -o regsync + chmod +x regsync + ./regsync version + ./regsync once -c hack/regsync.yaml diff --git a/build-scripts/hack/sync-registry.sh b/build-scripts/hack/sync-registry.sh new file mode 100755 index 000000000..38ab5504b --- /dev/null +++ b/build-scripts/hack/sync-registry.sh @@ -0,0 +1 @@ +regsync once --config ./sync-registry.yaml