Skip to content

Commit cb9f69a

Browse files
authored
Merge pull request #5762 from NlightNFotis/dockerhub_image_push_fourth_fix
[CI] Dockerhub image push action: commit to one syntax for string manipulation.
2 parents 5df251d + da4f42a commit cb9f69a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/release-packages.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,10 @@ jobs:
217217
submodules: recursive
218218
- name: Set Image Tag
219219
run: |
220-
echo ${{ github.ref }}
221-
echo $GITHUB_REF
222-
echo $GITHUB_REF | cut -d "/" -f 3 >> $VERSION
223-
arrVERSION=(${VERSION//-/ })
224-
echo "IMAGE_TAG=diffblue/cbmc:${arrVERSION[1]}" >> $GITHUB_ENV
220+
# Isolate the version number from a reference to a tag, for example,
221+
# '5.20.3' from a string like 'refs/tags/cbmc-5.20.3-exp'
222+
VERSION=$(echo ${{ github.ref }} | cut -d "/" -f 3 | cut -d "-" -f 2)
223+
echo "IMAGE_TAG=diffblue/cbmc:$VERSION" >> $GITHUB_ENV
225224
- name: Build docker image
226225
run: docker build -t "$IMAGE_TAG" .
227226
- name: Push docker image to DockerHub

0 commit comments

Comments
 (0)