We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b11e531 commit 92836d5Copy full SHA for 92836d5
.github/workflows/approve_workflow_run.yml
@@ -0,0 +1,21 @@
1
+# https://docs.github.com/en/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request
2
+
3
+name: Approve Workflow Run
4
5
+on:
6
+ workflow_run:
7
+ types:
8
+ - completed
9
10
+jobs:
11
+ approve:
12
+ runs-on: ubuntu-latest
13
+ if: ${{ github.event.workflow_run.conclusion == "action_required" }}
14
+ steps:
15
+ - name: Automatically approve a workflow run
16
+ run: |
17
+ curl \
18
+ --request POST \
19
+ --header "Accept: application/vnd.github.v3+json" \
20
+ --header "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
21
+ --url "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/approve"
0 commit comments