Skip to content

Commit cf2ec87

Browse files
committed
ci: use environment variables
1 parent 4104b6e commit cf2ec87

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ jobs:
2020
run: |
2121
set -x
2222
distribution=${{ matrix.id }}
23-
case "${{ github.ref }}" in
24-
refs/tags/*)
25-
version=$(echo "${{ github.ref }}" | sed -e "s,^refs/tags/,,g")
26-
;;
27-
*)
28-
version=latest
29-
;;
30-
esac
23+
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
24+
version="${GITHUB_REF_NAME}"
25+
else
26+
version=latest
27+
fi
3128
tags="groonga/groonga:${version}-${{ matrix.id }}"
3229
if [ ${{ matrix.id }} = "debian" -a "${version}" = "latest" ]; then
3330
tags="${tags},groonga/groonga:latest"

0 commit comments

Comments
 (0)