瀏覽代碼

(chore) covector comment on forks (#10331)

* (chore) covector comment on forks

* bump header year

* Update .github/workflows/covector-comment-on-fork.yml

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
Jacob Bolda 1 年之前
父節點
當前提交
cfc53074d0
共有 1 個文件被更改,包括 30 次插入0 次删除
  1. 30 0
      .github/workflows/covector-comment-on-fork.yml

+ 30 - 0
.github/workflows/covector-comment-on-fork.yml

@@ -0,0 +1,30 @@
+# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
+# SPDX-License-Identifier: Apache-2.0
+# SPDX-License-Identifier: MIT
+
+name: covector comment
+on:
+  workflow_run:
+    workflows: [covector status] # the `name` of the workflow run on `pull_request` running `status` with `comment: true`
+    types:
+      - completed
+
+# note all other permissions are set to none if not specified
+#  and these set the permissions for `secrets.GITHUB_TOKEN`
+permissions:
+  # to read the action artifacts on `covector status` workflows
+  actions: read
+  # to write the comment
+  pull-requests: write
+
+jobs:
+  comment:
+    runs-on: ubuntu-latest
+    if: github.event.workflow_run.conclusion == 'success' &&
+      (github.event.workflow_run.head_repository.full_name != github.repository || github.actor == 'dependabot[bot]')
+    steps:
+      - name: covector status
+        uses: jbolda/covector/packages/action@covector-v0
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          command: "status"