diff --git a/.github/workflows/merge_flake_lock_update.yml b/.github/workflows/merge_flake_lock_update.yml new file mode 100644 index 0000000..a183d5e --- /dev/null +++ b/.github/workflows/merge_flake_lock_update.yml @@ -0,0 +1,19 @@ +name: Auto Merge Pull Request +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * 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 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }} diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index 82aacf4..6b7ce74 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -20,12 +20,4 @@ jobs: pr-labels: | dependencies automated - - name: Enable auto-merge - if: ${{ success() }} - run: | - gh pr merge --auto --rebase "$PR_URL" - env: - PR_URL: ${{ steps.update-flake-lock.outputs.pull-request-url }} - GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_UPDATES }} - auto-merge: true - pr-allow-automerge: true + flake_lock_update