Skip to content

Commit 9877d88

Browse files
committed
fix: Transform branch name to valid Docker tag for dogfood
1 parent c8f8c95 commit 9877d88

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/dogfood.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ jobs:
2121
id: branch-name
2222
uses: tj-actions/branch-names@v5.4
2323

24+
- name: "Branch name to Docker tag name"
25+
id: docker-tag-name
26+
run: |
27+
tag=${{ steps.branch-name.outputs.current_branch }}
28+
# Replace / with --, e.g. user/feature => user--feature.
29+
tag=${tag//\//--}
30+
echo "::set-output name=tag::${tag}"
31+
2432
- name: Set up QEMU
2533
uses: docker/setup-qemu-action@v2
2634

@@ -38,6 +46,6 @@ jobs:
3846
with:
3947
context: "{{defaultContext}}:dogfood"
4048
push: true
41-
tags: "codercom/oss-dogfood:${{ steps.branch-name.outputs.current_branch }},codercom/oss-dogfood:latest"
49+
tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest"
4250
cache-from: type=registry,ref=codercom/oss-dogfood:latest
4351
cache-to: type=inline

0 commit comments

Comments
 (0)