nix-config/.github/workflows/merge.yml
Sanjay Chacku Purakal 7ffb3c92cd
change actor
2024-04-27 14:39:09 +02:00

22 lines
663 B
YAML

name: auto-merge
on:
pull_request:
branches: [ "main" ]
jobs:
merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'github-actions[bot]' }} && ${{ github.event.pull_request.title == 'Update flake.lock' }}
steps:
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }}
- name: Enable auto-merge for PR
run: gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }}