-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
e564ccf
commit aebb611
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Pull request auto-merge | ||
# | ||
# Automatically merge pull requests after requirements are met. | ||
# | ||
# References: | ||
# | ||
# - https://cli.github.com/manual/gh_pr_merge | ||
# - https://docs.github.com/actions/learn-github-actions/contexts | ||
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request | ||
# - https://docs.github.com/actions/using-workflows/using-github-cli-in-workflows | ||
# - https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository | ||
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request | ||
# - https://github.com/actions/checkout | ||
# - https://github.com/hmarr/debug-action | ||
|
||
--- | ||
name: auto-merge | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT_REPO }} | ||
jobs: | ||
auto-merge: | ||
if: github.event.pull_request.auto_merge == null && github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: debug | ||
name: Print environment variables and event payload | ||
uses: hmarr/[email protected] | ||
- id: checkout | ||
name: Checkout ${{ github.head_ref }} | ||
uses: actions/[email protected] | ||
with: | ||
persist-credentials: false | ||
ref: ${{ github.head_ref }} | ||
- id: enable | ||
name: Enable auto-merge | ||
run: gh pr merge ${{ github.event.number }} --auto --squash |