feat: Bump package version to 1.0.0 and enhance Docker publishing workflow with multi-platform support and dynamic tagging based on package version.

This commit is contained in:
kuekhaoyang
2025-11-29 11:51:32 +08:00
parent 8a0c294c55
commit e9c3ed21be
3 changed files with 30 additions and 7 deletions
+12 -5
View File
@@ -15,6 +15,13 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Get version from package.json
id: package-version
run: echo "version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -30,16 +37,16 @@ jobs:
with:
images: kuekhaoyang/kvideo
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}},value=v${{ steps.package-version.outputs.version }}
type=semver,pattern={{major}}.{{minor}},value=v${{ steps.package-version.outputs.version }}
type=raw,value=latest
type=raw,value=${{ steps.package-version.outputs.version }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/386,linux/ppc64le,linux/s390x
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}