From 8cf35801dbc2c1fc3661edbf5de0c1dd4dbeafc4 Mon Sep 17 00:00:00 2001 From: eaudetcobello Date: Sat, 18 May 2024 17:14:51 -0400 Subject: [PATCH] Review comments --- .github/data/sync-registry-config.yaml | 2 +- .github/scripts/sync-registry.sh | 12 ------------ .github/workflows/sync-registry.yaml | 3 +-- build-scripts/hack/sync-registry.sh | 9 +++++++++ 4 files changed, 11 insertions(+), 15 deletions(-) delete mode 100644 .github/scripts/sync-registry.sh create mode 100644 build-scripts/hack/sync-registry.sh diff --git a/.github/data/sync-registry-config.yaml b/.github/data/sync-registry-config.yaml index 93fc155b5..59da9d31e 100644 --- a/.github/data/sync-registry-config.yaml +++ b/.github/data/sync-registry-config.yaml @@ -1,3 +1,3 @@ k8s.gcr.io/sig-storage: images-by-semver: - pause: "= 3.7" \ No newline at end of file + pause: "= 3.7" diff --git a/.github/scripts/sync-registry.sh b/.github/scripts/sync-registry.sh deleted file mode 100644 index e708f9bff..000000000 --- a/.github/scripts/sync-registry.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -actor=${ACTOR} -token=${TOKEN} -dir=${DIR} - -docker run -v "$dir":/tmp/ quay.io/skopeo/stable:v1.15 sync \ - --src yaml \ - --dest docker \ - /tmp/.github/data/sync-registry-config.yaml ghcr.io/canonical \ - --format oci \ - --dest-creds "$actor":"$token" \ No newline at end of file diff --git a/.github/workflows/sync-registry.yaml b/.github/workflows/sync-registry.yaml index d9ef50b24..8b96d3876 100644 --- a/.github/workflows/sync-registry.yaml +++ b/.github/workflows/sync-registry.yaml @@ -13,6 +13,5 @@ jobs: env: ACTOR: ${{ github.actor }} TOKEN: ${{ secrets.GITHUB_TOKEN }} - DIR: ${GITHUB_WORKSPACE} run: | - ./${GITHUB_WORKSPACE}/.github/scripts/sync-registry.sh \ No newline at end of file + ./${GITHUB_WORKSPACE}/build-scripts/hack/sync-registry.sh \ No newline at end of file diff --git a/build-scripts/hack/sync-registry.sh b/build-scripts/hack/sync-registry.sh new file mode 100644 index 000000000..36f254787 --- /dev/null +++ b/build-scripts/hack/sync-registry.sh @@ -0,0 +1,9 @@ +#!/bin/bash +DIR=$(realpath $(dirname "${0}")) + +docker run -v "${DIR}/registry-k8s-io.yaml":/config.yaml quay.io/skopeo/stable:v1.15 sync \ + --src yaml \ + --dest docker \ + /config.yaml ghcr.io/canonical \ + --format oci \ + --dest-creds "${ACTOR}":"${TOKEN}"