|
13 | 13 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 |
14 | 14 | with: |
15 | 15 | fetch-depth: '0' |
16 | | - fetch-tags: true |
17 | 16 |
|
18 | 17 | - name: Set env variables |
19 | 18 | run: | |
|
74 | 73 | IMAGE_RELEASE=$(echo ${IMAGE_INFO} | jq -r '.Labels.build_version' | awk '{print $3}') |
75 | 74 | IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-nbxyz' '{print $1}') |
76 | 75 | 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}) |
82 | 77 | if [ -z "${MULTIDIGEST}" ] || [ "${MULTIDIGEST}" == "null" ]; then |
83 | 78 | echo "**** No existing container build found, assuming first build ****" |
84 | 79 | VERSION_TAG=${WEBAPP_RELEASE}-nbxyz1 |
@@ -142,20 +137,8 @@ jobs: |
142 | 137 | ghcr.io/netbootxyz/netbootxyz:${{ env.VERSION_TAG }} |
143 | 138 | labels: ${{ steps.meta.outputs.labels }} |
144 | 139 |
|
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 | | -
|
157 | 140 | - 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' |
159 | 142 | id: tag_version |
160 | 143 | uses: anothrNick/github-tag-action@1.73.0 |
161 | 144 | env: |
|
0 commit comments