mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix: Transform branch name to valid Docker tag for dogfood (#3703)
This commit is contained in:
committed by
GitHub
parent
c8f8c95f6a
commit
6a00baf235
10
.github/workflows/dogfood.yaml
vendored
10
.github/workflows/dogfood.yaml
vendored
@ -21,6 +21,14 @@ jobs:
|
|||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v5.4
|
uses: tj-actions/branch-names@v5.4
|
||||||
|
|
||||||
|
- name: "Branch name to Docker tag name"
|
||||||
|
id: docker-tag-name
|
||||||
|
run: |
|
||||||
|
tag=${{ steps.branch-name.outputs.current_branch }}
|
||||||
|
# Replace / with --, e.g. user/feature => user--feature.
|
||||||
|
tag=${tag//\//--}
|
||||||
|
echo "::set-output name=tag::${tag}"
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
@ -38,6 +46,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: "{{defaultContext}}:dogfood"
|
context: "{{defaultContext}}:dogfood"
|
||||||
push: true
|
push: true
|
||||||
tags: "codercom/oss-dogfood:${{ steps.branch-name.outputs.current_branch }},codercom/oss-dogfood:latest"
|
tags: "codercom/oss-dogfood:${{ steps.docker-tag-name.outputs.tag }},codercom/oss-dogfood:latest"
|
||||||
cache-from: type=registry,ref=codercom/oss-dogfood:latest
|
cache-from: type=registry,ref=codercom/oss-dogfood:latest
|
||||||
cache-to: type=inline
|
cache-to: type=inline
|
||||||
|
Reference in New Issue
Block a user