Files
dotfiles/.github/workflows/merge_flake_lock_update.yml
2025-06-22 20:44:28 -04:00

28 lines
719 B
YAML

name: Auto Merge Pull Request
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * 6"
jobs:
merge:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Enable auto-merge
run: gh pr merge flake_lock_update --auto
- name: Enable auto-merge
run: |
pr_number=$(gh pr list --state open --author RichieCahill --label flake_lock_update --json number --jq '.[0].number')
if [ -n "$pr_number" ]; then
gh pr merge "$pr_number" --auto
else
echo "No open PR found with label flake_lock_update"
fi
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }}