瀏覽代碼

feat: trigger docker build after release

Jun Siang Cheah 1 年之前
父節點
當前提交
b7ced4e4f1
共有 2 個文件被更改,包括 12 次插入0 次删除
  1. 11 0
      .github/workflows/build-release.yml
  2. 1 0
      .github/workflows/docker-build.yaml

+ 11 - 0
.github/workflows/build-release.yml

@@ -57,3 +57,14 @@ jobs:
         path: .
         path: .
       env:
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+    - name: Trigger Docker build workflow
+      uses: actions/github-script@v7
+      with:
+        script: |
+          github.rest.actions.createWorkflowDispatch({
+            owner: context.repo.owner,
+            repo: context.repo.repo,
+            workflow_id: 'docker-build.yaml',
+            ref: 'v${{ steps.get_version.outputs.version }}',
+          })

+ 1 - 0
.github/workflows/docker-build.yaml

@@ -3,6 +3,7 @@ name: Create and publish a Docker image
 
 
 # Configures this workflow to run every time a change is pushed to the branch called `release`.
 # Configures this workflow to run every time a change is pushed to the branch called `release`.
 on:
 on:
+  workflow_dispatch:
   push:
   push:
     branches:
     branches:
       - main
       - main