Skip to content

Commit c481f0e

Browse files
authored
Merge pull request #91 from netbootxyz/ci-workflow-fix
Revert fixes
2 parents 6a010e4 + 83032a8 commit c481f0e

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1414
with:
1515
fetch-depth: '0'
16-
fetch-tags: true
1716

1817
- name: Set env variables
1918
run: |
@@ -74,11 +73,7 @@ jobs:
7473
IMAGE_RELEASE=$(echo ${IMAGE_INFO} | jq -r '.Labels.build_version' | awk '{print $3}')
7574
IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-nbxyz' '{print $1}')
7675
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
76+
TAG_SHA=$(git rev-list -n 1 ${IMAGE_RELEASE})
8277
if [ -z "${MULTIDIGEST}" ] || [ "${MULTIDIGEST}" == "null" ]; then
8378
echo "**** No existing container build found, assuming first build ****"
8479
VERSION_TAG=${WEBAPP_RELEASE}-nbxyz1
@@ -142,20 +137,8 @@ jobs:
142137
ghcr.io/netbootxyz/netbootxyz:${{ env.VERSION_TAG }}
143138
labels: ${{ steps.meta.outputs.labels }}
144139

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-
157140
- 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'
141+
if: steps.version_check.outcome == 'success' && steps.version_check.conclusion == 'success'
159142
id: tag_version
160143
uses: anothrNick/github-tag-action@1.73.0
161144
env:

0 commit comments

Comments
 (0)