瀏覽代碼

create release event for doc/web-content (#257)

Signed-off-by: czhen <zhen.chen@zilliz.com>
Zhen Chen 3 年之前
父節點
當前提交
bc0cc7995e
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      .github/workflows/release_event.yml

+ 24 - 0
.github/workflows/release_event.yml

@@ -0,0 +1,24 @@
+name: web-content - Dispatch new release event
+
+on:
+  release:
+    types: [published]
+
+jobs:
+  dispatch:
+    name: Dispatch event
+    runs-on: ubuntu-latest
+    steps:
+      - name: Tag name
+        id: tag_name
+        run: |
+          echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
+      - name: Dispatch tag name
+        id: dispatch_tag_name
+        run: |
+          curl \
+          -X POST \
+          -H "Accept: application/vnd.github.v3+json" \
+          "https://api.github.com/repos/milvus-io/web-content/actions/workflows/updateApiReference.yml/dispatches" \
+          -d '{"ref":"master", "inputs": { "tagName": "${{ steps.tag_name.outputs.SOURCE_TAG }}", "repoName": "${{ github.event.repository.name }}" } }' \
+          -u ".:${{secrets.DOC_TOKEN}}"