From bc2b7f7cdbdd64fa96f6a02830830369d64c1488 Mon Sep 17 00:00:00 2001 From: kaznak Date: Thu, 14 Dec 2023 09:04:01 +0900 Subject: [PATCH] update --- .github/matrix-to-tag.sh | 6 +++--- .github/workflows/build.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/matrix-to-tag.sh b/.github/matrix-to-tag.sh index ed8459d..f762aab 100755 --- a/.github/matrix-to-tag.sh +++ b/.github/matrix-to-tag.sh @@ -4,18 +4,18 @@ # cat \ # cloudnativepg-configured/16/strategy.json \ # cloudnativepg-configured/16/strategy.json \ -# | .github/generate-strategy.sh \ +# | .github/generate-strategy.sh myrepository/ \ # | jq -c '.matrix.include|.[]' \ # | .github/matrix-to-tag.sh # set -eu -repository=$1 +repository_with_trailing_slash=$1 jq -r ' .imgname as $name | .tags | .[] | . as $tag | -"'$repository'/\($name):\($tag)"' | +"'$repository_with_trailing_slash'\($name):\($tag)"' | tr '\n' ',' | sed -e 's/^/TAGS=/' -e 's/,$/\n/' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 383badd..419d51f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: - name: Generate and set Tags run: | - bash .github/matrix-to-tag.sh $IMAGE_REPOSITORY_DIR <<< "${{ toJson(matrix) }}" \ + bash .github/matrix-to-tag.sh ${IMAGE_REPOSITORY_DIR}/ <<< "${{ toJson(matrix) }}" \ | tee -a $GITHUB_ENV - name: Set up Docker Buildx