We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f7ad6a2 + d387d8f commit 710db26Copy full SHA for 710db26
1 file changed
.github/workflows/docker-image.yml
@@ -35,9 +35,12 @@ jobs:
35
username: ${{ github.actor }}
36
password: ${{ secrets.GITHUB_TOKEN }}
37
38
- - name: Extract branch name
+ - name: Extract image tag
39
shell: bash
40
- run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"
+ run: |
41
+ raw_ref="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
42
+ safe_tag="$(echo "$raw_ref" | tr '[:upper:]' '[:lower:]' | sed 's|[^a-z0-9._-]|-|g')"
43
+ echo "branch=$safe_tag" >> "$GITHUB_OUTPUT"
44
id: extract_branch
45
46
- name: Build And Push Image
0 commit comments