Skip to content

Commit 2455598

Browse files
committed
Revert "Fix CI build failure and tag creation issues in release workflow"
This reverts commit b516786.
1 parent b516786 commit 2455598

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ jobs:
7474
IMAGE_RELEASE=$(echo ${IMAGE_INFO} | jq -r '.Labels.build_version' | awk '{print $3}')
7575
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-nbxyz' '{print $1}')
7676
NB_RELEASE_NUMBER=$(echo ${IMAGE_RELEASE} | awk -F'-nbxyz' '{print $2}')
77-
if git rev-parse --verify "refs/tags/${IMAGE_RELEASE}" >/dev/null 2>&1; then
78-
TAG_SHA=$(git rev-list -n 1 ${IMAGE_RELEASE})
79-
else
80-
TAG_SHA=""
81-
fi
77+
TAG_SHA=$(git rev-list -n 1 ${IMAGE_RELEASE} 2>/dev/null || echo "")
8278
if [ -z "${MULTIDIGEST}" ] || [ "${MULTIDIGEST}" == "null" ]; then
8379
echo "**** No existing container build found, assuming first build ****"
8480
VERSION_TAG=${WEBAPP_RELEASE}-nbxyz1
@@ -142,20 +138,8 @@ jobs:
142138
ghcr.io/netbootxyz/netbootxyz:${{ env.VERSION_TAG }}
143139
labels: ${{ steps.meta.outputs.labels }}
144140

145-
- name: Check if tag exists
146-
if: steps.version_check.outcome == 'success' && steps.version_check.conclusion == 'success'
147-
id: check_tag
148-
run: |
149-
if git rev-parse --verify "refs/tags/${{ env.VERSION_TAG }}" >/dev/null 2>&1; then
150-
echo "Tag ${{ env.VERSION_TAG }} already exists, skipping tag creation"
151-
echo "tag_exists=true" >> $GITHUB_OUTPUT
152-
else
153-
echo "Tag ${{ env.VERSION_TAG }} does not exist, will create"
154-
echo "tag_exists=false" >> $GITHUB_OUTPUT
155-
fi
156-
157141
- name: Bump version and push tag
158-
if: steps.version_check.outcome == 'success' && steps.version_check.conclusion == 'success' && steps.check_tag.outputs.tag_exists == 'false'
142+
if: steps.version_check.outcome == 'success' && steps.version_check.conclusion == 'success'
159143
id: tag_version
160144
uses: anothrNick/[email protected]
161145
env:

0 commit comments

Comments
 (0)