mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-23 23:19:47 +00:00
* fix(action): testing and fixing errors * fix: testing if all is a valid entry for workflows * fix: more events to trigger workflow tests * fix: double quotes -> single quotes * fix: add workflows name to the list * revert: remove added events This reverts commit 3daeeb2ba34b8a9cde93fce2cac682378aea5e9a
23 lines
759 B
YAML
23 lines
759 B
YAML
# https://docs.github.com/en/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request
|
|
|
|
name: "Approve Workflow Run"
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ['build', 'project_euler', 'pre-commit', 'directory_writer']
|
|
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"
|