-
-
Notifications
You must be signed in to change notification settings - Fork 67
32 lines (26 loc) · 967 Bytes
/
commands.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Custom Commands
on:
pull_request:
branches:
- master
jobs:
custom_actions:
runs-on: ubuntu-latest
steps:
- name: Manual trigger
id: manual_trigger
run: echo "This workflow is triggered manually."
- name: Confirm manual trigger
if: ${{ github.event_name == 'pull_request' }}
run: echo "Please confirm the manual trigger by commenting '/run-custom-actions' on the pull request."
- name: Wait for approval
if: ${{ github.event_name == 'pull_request' }}
run: |
while true; do
sleep 30
comments=$(curl -sH "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -X GET "${{ github.event.pull_request.comments_url }}" | jq -r ".[] | select(.body == \"/run-custom-actions\") | .id")
if [ ! -z "$comments" ]; then
break
fi
done
# Add your existing steps for benchmarks, formatting, etc. here