Skip to content

Commit 36e068b

Browse files
committed
Add version to published packages
1 parent 89b6f6f commit 36e068b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/build-and-publish-image.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
- name: Get metadata
3939
id: meta
4040
uses: docker/metadata-action@v4
41+
tags: |
42+
type=semver,pattern={{raw}},value=${{ }}
43+
type=ref,event=branch
44+
type=ref,event=pr
45+
type=sha
4146
with:
4247
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4348

@@ -47,6 +52,14 @@ jobs:
4752
LATEST_RELEASE_VERSION=$(curl -s https://api.github.com/repos/ankitects/anki/releases/latest | jq -r '.tag_name')
4853
echo "latest_release_version=$LATEST_RELEASE_VERSION" >> $GITHUB_OUTPUT
4954
55+
- name: Get metadata
56+
id: meta
57+
uses: docker/metadata-action@v4
58+
tags: |
59+
type=semver,pattern={{raw}},value=${{ $LATEST_RELEASE_VERSION }}
60+
with:
61+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
62+
5063
- name: Build and push image
5164
uses: docker/build-push-action@v3
5265
with:
@@ -55,7 +68,6 @@ jobs:
5568
platforms: linux/amd64,linux/arm64
5669
push: true
5770
tags: ${{ steps.meta.outputs.tags }}
58-
labels: ${{ steps.meta.outputs.labels }}
5971

6072
- name: Upload new release version as artifacts
6173
run: |

0 commit comments

Comments
 (0)