Skip to content

Commit

Permalink
TEST: Try implementing custom actions
Browse files Browse the repository at this point in the history
[skip tests]
  • Loading branch information
jpsamaroo committed Jul 31, 2023
1 parent 8afc692 commit a5d950b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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

0 comments on commit a5d950b

Please sign in to comment.