chore(workflows): update image tagging strategy in publish.yaml to use semver and improve deployment conditions

This commit is contained in:
keven1024
2026-04-05 14:03:17 +08:00
parent 8d3675cfa1
commit 30d0abc2b5

View File

@@ -21,8 +21,8 @@ jobs:
with: with:
images: fudaoyuanicu/015-app images: fudaoyuanicu/015-app
tags: | tags: |
type=pep440,pattern={{version}} type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }}
- name: Set build time - name: Set build time
id: build-time id: build-time
run: | run: |
@@ -56,8 +56,8 @@ jobs:
with: with:
images: fudaoyuanicu/015-worker images: fudaoyuanicu/015-worker
tags: | tags: |
type=pep440,pattern={{version}} type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }}
- name: Set build time - name: Set build time
id: build-time id: build-time
run: | run: |
@@ -76,6 +76,7 @@ jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-app, build-worker] needs: [build-app, build-worker]
if: ${{ !contains(github.ref_name, '-') }}
steps: steps:
- name: Send deployment webhook - name: Send deployment webhook
run: | run: |