Trial #10
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: PR Checks and Auto Merge | |
on: | |
pull_request: | |
branches: | |
- main # Adjust the branch as needed | |
jobs: | |
pr_checks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x # Specify Python version | |
- name: Run PR checks | |
run: | | |
python pr_checks.py | |
- name: Merge PR if checks passed | |
if: success() && github.event_name == 'pull_request' | |
run: | | |
curl -X PUT \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
-d '{"merge_method":"squash"}' \ | |
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }}/merge" |