mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-19 21:19:47 +00:00
feat: action to approve workflow run (#4444)
This commit is contained in:
parent
b11e5314b7
commit
92836d57f6
21
.github/workflows/approve_workflow_run.yml
vendored
Normal file
21
.github/workflows/approve_workflow_run.yml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# https://docs.github.com/en/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request
|
||||||
|
|
||||||
|
name: Approve Workflow Run
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
approve:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == "action_required" }}
|
||||||
|
steps:
|
||||||
|
- name: Automatically approve a workflow run
|
||||||
|
run: |
|
||||||
|
curl \
|
||||||
|
--request POST \
|
||||||
|
--header "Accept: application/vnd.github.v3+json" \
|
||||||
|
--header "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
|
--url "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }}/approve"
|
Loading…
x
Reference in New Issue
Block a user