Skip to content

Commit 236f3fa

Browse files
committed
build: cicd
1 parent a95dbe4 commit 236f3fa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/build-docker.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,20 @@ jobs:
3535
username: ${{ github.actor }}
3636
password: ${{ secrets.GITHUB_TOKEN }}
3737

38+
- name: Extract version from package.json
39+
id: pkg
40+
run: |
41+
VERSION=$(jq -r '.version' package.json)
42+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
43+
3844
- name: Extract metadata (tags, labels)
3945
id: meta
4046
uses: docker/metadata-action@v5
4147
with:
4248
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49+
tags: |
50+
type=raw,value=${{ steps.pkg.outputs.version }}
51+
type=raw,value=latest,enable={{is_default_branch}}
4352
4453
- name: Build and push
4554
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)