diff --git a/.github/workflows/auto-merge.yaml b/.github/workflows/auto-merge.yaml new file mode 100644 index 0000000..cae47da --- /dev/null +++ b/.github/workflows/auto-merge.yaml @@ -0,0 +1,37 @@ +name: Auto Merge + +on: + # Try enabling auto-merge for a pull request when a draft is marked as “ready for review”, when + # a required label is applied or when a “do not merge” label is removed, or when a pull request + # is updated in any way (opened, synchronized, reopened, edited). + pull_request_target: + types: + - opened + - synchronize + - reopened + - edited + - labeled + - unlabeled + - ready_for_review + + # Try enabling auto-merge for the specified pull request or all open pull requests if none is + # specified. + workflow_dispatch: + inputs: + pull-request: + description: Pull Request Number + required: false + +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - uses: reitermarkus/automerge@v2 + with: + token: ${{ secrets.MY_GITHUB_TOKEN }} + merge-method: rebase + do-not-merge-labels: never-merge + required-labels: automerge + pull-request: ${{ github.event.inputs.pull-request }} + review: ${{ github.event.inputs.review }} + dry-run: false diff --git a/.github/workflows/lock-update.yaml b/.github/workflows/lock-update.yaml index 7debd14..7919775 100644 --- a/.github/workflows/lock-update.yaml +++ b/.github/workflows/lock-update.yaml @@ -1,4 +1,5 @@ -name: update-flake-lock +name: Update Flake Lock + on: workflow_dispatch: schedule: @@ -19,3 +20,5 @@ jobs: uses: DeterminateSystems/update-flake-lock@main with: token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} + pr-labels: | + automerge