We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bf2e14 commit dcdea28Copy full SHA for dcdea28
1 file changed
.github/workflows/build-dev-image.yaml
@@ -27,6 +27,11 @@ jobs:
27
- name: 📦 Checkout code
28
uses: actions/checkout@v4
29
30
+ - name: 🧰 Get branch name
31
+ run: | # Get the branch name from the ref and replace non-alphanumeric characters with hyphens
32
+ BRANCH=$(echo "${BRANCH_NAME#refs/heads/}" | sed -e 's/[^a-zA-Z0-9]/-/g')
33
+ echo "BRANCH=$BRANCH" >> $GITHUB_ENV
34
+
35
- name: 🏷️ Generate Docker metadata
36
id: meta
37
uses: docker/metadata-action@v5
@@ -43,6 +48,7 @@ jobs:
43
48
type=semver,pattern=v{{major}}
44
49
type=sha,format=long
45
50
type=raw,value=latest,enable={{is_default_branch}}
51
+ type=raw,value=${{ env.BRANCH_NAME }},priority=10
46
52
annotations: |
47
53
runnumber=${{ github.run_id }}
54
sha=${{ github.sha }}
0 commit comments