Skip to content

Commit 047c893

Browse files
committed
Try fixing tag name in deployment image
1 parent 8ce9bfd commit 047c893

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

.github/workflows/deploy-image.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,8 @@ jobs:
1010

1111
runs-on: ubuntu-latest
1212

13-
steps:
14-
# Github stores the current tag in an enviroment variable (GITHUB_REF) in the format /refs/tags/TAG_NAME.
15-
# Using shell parameter expansion, we extract the TAG_NAME. Also, it seems we cannot use shell tricks
16-
# directly in the with block, so doing it in a separate step and then fetching its output when needed.
17-
- name: Get the tag name
18-
id: get_tag
19-
run: echo ::set-output name=TAG::${GITHUB_REF/refs\/tags\//}
20-
13+
steps:
14+
2115
- name: Docker Setup Buildx
2216
uses: docker/setup-buildx-action@v2
2317

@@ -30,10 +24,10 @@ jobs:
3024
- name: Build and push Docker images
3125
uses: docker/build-push-action@v4
3226
with:
33-
build-args: GIT_COMMIT_SHA=${{ steps.get_tag.outputs.TAG }}
27+
build-args: GIT_COMMIT_SHA=${{ github.ref_name }}
3428
cache-from: metabrainz/listenbrainz:cache
3529
# use mode=max to cache intermediate layers as well
3630
cache-to: type=registry,mode=max,oci-mediatypes=true,compression=zstd,compression-level=7,ref=metabrainz/listenbrainz:cache
3731
push: true
38-
tags: metabrainz/listenbrainz:${{ steps.get_tag.outputs.TAG }}
32+
tags: metabrainz/listenbrainz:${{ github.ref_name }}
3933
target: listenbrainz-prod

0 commit comments

Comments
 (0)