Skip to content

Commit 3cb6c7a

Browse files
authored
Merge pull request #9 from mietzen/fix-ci-release
Use release name as version
2 parents f94eabb + 1c2c1f0 commit 3cb6c7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/docker-image.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ jobs:
2121
id: set-matrix
2222
run: |
2323
echo "build_matrix=$(cat .github/platforms.json)" >> $GITHUB_OUTPUT
24-
echo "version=$(grep FROM ./Dockerfile | head -n1 | cut -d':' -f2 | cut -d' ' -f1 | xargs)" >> $GITHUB_OUTPUT
24+
if [ "${{ github.event_name }}" = "release" ]; then
25+
echo "version=${{ github.event.release.name }}" >> $GITHUB_OUTPUT
26+
else
27+
echo "version=$(grep FROM ./Dockerfile | head -n1 | cut -d':' -f2 | cut -d' ' -f1 | xargs)" >> $GITHUB_OUTPUT
28+
fi
2529
echo "repo_name_lower_case=$(echo ${GITHUB_REPOSITORY@L} | cut -d'/' -f2)" >> $GITHUB_OUTPUT
2630
2731
Build:

0 commit comments

Comments
 (0)