From 240de250ab81108aec58136c205da3adfb0d0c5a Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Fri, 17 Jul 2026 17:06:07 +0800 Subject: [PATCH] chore(gh): minor github actions --- .github/workflows/gh_pr_label.yml | 2 +- .../{push_image.yml => push_docker_image.yml} | 28 ++++++++--------- ...ge_next.yml => push_docker_image_next.yml} | 28 ++++++++--------- .github/workflows/release.yml | 30 +++++++++---------- .github/workflows/release_sync_gitee.yml | 2 +- Dockerfile.gh => Dockerfile_gh | 0 6 files changed, 45 insertions(+), 45 deletions(-) rename .github/workflows/{push_image.yml => push_docker_image.yml} (80%) rename .github/workflows/{push_image_next.yml => push_docker_image_next.yml} (79%) rename Dockerfile.gh => Dockerfile_gh (100%) diff --git a/.github/workflows/gh_pr_label.yml b/.github/workflows/gh_pr_label.yml index 03a92b3f9..5ad355745 100644 --- a/.github/workflows/gh_pr_label.yml +++ b/.github/workflows/gh_pr_label.yml @@ -18,7 +18,7 @@ jobs: pull-requests: write steps: - name: Add waiting-for-review label - uses: actions/github-script@v8 + uses: actions/github-script@v9 with: script: | await github.rest.issues.addLabels({ diff --git a/.github/workflows/push_image.yml b/.github/workflows/push_docker_image.yml similarity index 80% rename from .github/workflows/push_image.yml rename to .github/workflows/push_docker_image.yml index d69284c07..82f92ceba 100644 --- a/.github/workflows/push_image.yml +++ b/.github/workflows/push_docker_image.yml @@ -1,4 +1,4 @@ -name: Docker Image CI (stable versions) +name: Push Docker Image on: push: @@ -6,6 +6,7 @@ on: - "v[0-9]*" - "!v*alpha*" - "!v*beta*" + - "!v*preview*" - "!v*rc*" workflow_dispatch: inputs: @@ -19,13 +20,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false - name: Set up Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: 24 @@ -35,7 +36,7 @@ jobs: npm --prefix=./ui run build - name: Upload UI build artifacts - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7 with: name: ui-build path: ./ui/dist @@ -46,7 +47,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false @@ -58,14 +59,14 @@ jobs: tool-cache: false - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | certimate/certimate @@ -77,30 +78,29 @@ jobs: type=semver,pattern=v{{major}}.{{minor}} - name: Log in to DOCKERHUB - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Log in to ALIYUNCS - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: registry.cn-shanghai.aliyuncs.com username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Download UI build artifacts - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: name: ui-build path: ./ui/dist - name: Build and push Docker image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . - # file: ./Dockerfile - file: ./Dockerfile.gh + file: ./Dockerfile_gh platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/push_image_next.yml b/.github/workflows/push_docker_image_next.yml similarity index 79% rename from .github/workflows/push_image_next.yml rename to .github/workflows/push_docker_image_next.yml index 9da316432..c8ae92f11 100644 --- a/.github/workflows/push_image_next.yml +++ b/.github/workflows/push_docker_image_next.yml @@ -1,10 +1,11 @@ -name: Docker Image CI (preview versions) +name: Push Docker Image (preview versions) on: push: tags: - "v[0-9]*-alpha*" - "v[0-9]*-beta*" + - "v[0-9]*-preview*" - "v[0-9]*-rc*" workflow_dispatch: inputs: @@ -18,13 +19,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false - name: Set up Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: 24 @@ -34,7 +35,7 @@ jobs: npm --prefix=./ui run build - name: Upload UI build artifacts - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7 with: name: ui-build path: ./ui/dist @@ -45,7 +46,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false @@ -57,14 +58,14 @@ jobs: tool-cache: false - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | certimate/certimate @@ -76,30 +77,29 @@ jobs: latest=false - name: Log in to DOCKERHUB - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Log in to ALIYUNCS - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: registry.cn-shanghai.aliyuncs.com username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Download UI build artifacts - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: name: ui-build path: ./ui/dist - name: Build and push Docker image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 with: context: . - # file: ./Dockerfile - file: ./Dockerfile.gh + file: ./Dockerfile_gh platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true tags: ${{ steps.meta.outputs.tags }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3635c0f45..52984f5ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,13 +10,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false - name: Set up Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@v7 with: node-version: 24 @@ -26,7 +26,7 @@ jobs: npm --prefix=./ui run build - name: Upload UI build artifacts - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7 with: name: ui-build path: ./ui/dist @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false @@ -49,7 +49,7 @@ jobs: go-version-file: "go.mod" - name: Download UI build artifacts - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: name: ui-build path: ./ui/dist @@ -72,7 +72,7 @@ jobs: done - name: Upload Linux binaries - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7 with: name: linux-binaries path: dist/linux/ @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false @@ -95,7 +95,7 @@ jobs: go-version-file: "go.mod" - name: Download UI build artifacts - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: name: ui-build path: ./ui/dist @@ -112,7 +112,7 @@ jobs: done - name: Upload macOS binaries - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7 with: name: macos-binaries path: dist/darwin/ @@ -123,7 +123,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false @@ -135,7 +135,7 @@ jobs: go-version-file: "go.mod" - name: Download UI build artifacts - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: name: ui-build path: ./ui/dist @@ -153,7 +153,7 @@ jobs: done - name: Upload Windows binaries - uses: actions/upload-artifact@v5 + uses: actions/upload-artifact@v7 with: name: windows-binaries path: dist/windows/ @@ -166,13 +166,13 @@ jobs: contents: write steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false - name: Download all binaries - uses: actions/download-artifact@v6 + uses: actions/download-artifact@v8 with: path: ./artifacts @@ -211,7 +211,7 @@ jobs: sha256sum *.zip > checksums.txt - name: Create Release - uses: softprops/action-gh-release@v2 + uses: softprops/action-gh-release@v3 with: files: | dist/*.zip diff --git a/.github/workflows/release_sync_gitee.yml b/.github/workflows/release_sync_gitee.yml index d1963fe1d..d9b14e591 100644 --- a/.github/workflows/release_sync_gitee.yml +++ b/.github/workflows/release_sync_gitee.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@v7 with: fetch-depth: 1 persist-credentials: false diff --git a/Dockerfile.gh b/Dockerfile_gh similarity index 100% rename from Dockerfile.gh rename to Dockerfile_gh