Skip to content

Commit da4f42a

Browse files
committed
Commit to one syntax for string manipulation.
Commit to one syntax for isolating the version number, remove the debug statements and add an explanatory comment.
1 parent 5df251d commit da4f42a

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)