Skip to content

Workflow file for this run

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"