TEST: Try implementing custom actions #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |