Skip to content

Commit bdc270b

Browse files
committed
ci: image tag name derivation
1 parent 89ea7db commit bdc270b

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
image:
8888
needs: build
8989
# only on main and dev branch
90-
if: startsWith(github.ref, 'refs/heads/main') || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/sgratzl/flaskx'
90+
if: startsWith(github.ref, 'refs/heads/main') || github.ref == 'refs/heads/dev'
9191
runs-on: ubuntu-latest
9292
steps:
9393
- name: Check out code
@@ -108,14 +108,9 @@ jobs:
108108
run: |
109109
baseRef="${GITHUB_REF#*/}"
110110
imageTag="${baseRef#*/}"
111-
case "${baseRef}" in
112-
main)
111+
if [ "$imageTag" = "main" ] ; then
113112
imageTag="latest"
114-
;;
115-
*)
116-
imageTag="${baseRef//\//_}" # replace `/` with `_` in branch name
117-
;;
118-
esac
113+
fi
119114
echo "::set-output name=tag::$imageTag"
120115
echo "::set-output name=repo::ghcr.io/${{ github.repository }}"
121116
- name: Push Dev Tag

0 commit comments

Comments
 (0)