Skip to content

Commit 16cc6e5

Browse files
authored
ci: fix issue with ubi image name replacing plus with a dash (#103)
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
1 parent cc21648 commit 16cc6e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/image-build-and-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929
run: |
3030
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
3131
# For main branch, use semver with -dev suffix
32-
echo "tag=0.0.1-dev.$GITHUB_RUN_NUMBER+$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
32+
echo "tag=0.0.1-dev.${GITHUB_RUN_NUMBER}_$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
3333
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
3434
# For tags, use the tag as is (assuming it's semver)
3535
TAG="${{ github.ref_name }}"
3636
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
3737
else
3838
# For other branches, use branch name and run number
3939
BRANCH="${{ github.ref_name }}"
40-
echo "tag=0.0.1-$BRANCH.$GITHUB_RUN_NUMBER+$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
40+
echo "tag=0.0.1-$BRANCH.${GITHUB_RUN_NUMBER}_$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
4141
fi
4242
4343
- name: Login to GitHub Container Registry
@@ -76,7 +76,7 @@ jobs:
7676
BUILD_DATE: ${{ github.event.head_commit.timestamp }}
7777
KO_CONFIG_PATH: ${{ github.workspace }}/.github/ko-ci.yml
7878
run: |
79-
TAG=$(echo "${{ steps.version-string.outputs.tag }}" | sed 's/+/_/g')
79+
TAG=$(echo "${{ steps.version-string.outputs.tag }}")
8080
TAGS="-t $TAG"
8181
8282
# Add latest tag only if building from a tag
@@ -103,8 +103,8 @@ jobs:
103103
# This step uses the identity token to provision an ephemeral certificate
104104
# against the sigstore community Fulcio instance.
105105
run: |
106-
TAG=$(echo "${{ steps.version-string.outputs.tag }}" | sed 's/+/_/g')
107-
UBI_TAG=$(echo "${{ steps.version-string.outputs.tag }}-ubi" | sed 's/+/_/g')
106+
TAG=$(echo "${{ steps.version-string.outputs.tag }}")
107+
UBI_TAG=$(echo "${{ steps.version-string.outputs.tag }}-ubi")
108108
# Sign the ko image
109109
cosign sign -y $BASE_REPO:$TAG
110110
cosign sign -y $BASE_REPO:$UBI_TAG

0 commit comments

Comments
 (0)