Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:whale: Skip Docker image build for alpha/beta/rc prereleases

Daniel224a68d22c5d
diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml
index 1a320ca605..d38ba79fea 100644
--- a/.github/workflows/dockerimage.yml
+++ b/.github/workflows/dockerimage.yml
@@ -13,7 +13,9 @@ env:
jobs:
build:
- if: ${{ github.repository_owner == 'siyuan-note' }}
+ # 仅 stable 版本(tag 不含 alpha/beta/rc)才构建 Docker 镜像,
+ # alpha/beta/rc 预发布版本跳过整个构建流程
+ if: ${{ github.repository_owner == 'siyuan-note' && !contains(github.ref_name, '-alpha') && !contains(github.ref_name, '-beta') && !contains(github.ref_name, '-rc') }}
name: build
runs-on: ubuntu-latest
permissions:
@@ -73,10 +75,6 @@ jobs:
password: ${{ secrets.DOCKER_HUB_PWD }}
- name: Build and push Docker image
+ # 走到这里的一定是 stable 版本,直接同时打 :latest 和具体版本号标签
run: |
- LATEST_FLAG=""
- # 仅 stable 版本(tag 不含 alpha/beta/rc)才打 :latest 标签
- if [[ "${{ github.ref }}" != *-alpha* && "${{ github.ref }}" != *-beta* && "${{ github.ref }}" != *-rc* ]]; then
- LATEST_FLAG="-t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:latest"
- fi
- docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 $LATEST_FLAG -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:v${{ steps.version.outputs.value }} .
+ docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:latest -t ${{ env.docker_hub_owner }}/${{ env.docker_hub_repo }}:v${{ steps.version.outputs.value }} .