Skip to content

Commit

Permalink
ci: use enable-auto-merge-action
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed May 9, 2024
1 parent 6586fac commit 5f7ed2b
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/wc-enable-auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,9 @@ jobs:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
- uses: suzuki-shunsuke/enable-auto-merge-action@ec074392e76cd1062925255cd82a86ea1c44b6fd # v0.1.0
with:
app_id: ${{secrets.gh_app_id}}
private_key: ${{secrets.gh_app_private_key}}
permissions: >-
{
"contents": "write",
"pull_requests": "write"
}
repositories: >-
[
"${{github.event.repository.name}}"
]
- run: gh -R "$GITHUB_REPOSITORY" pr merge --squash --auto --delete-branch "$PR_NUMBER"
env:
GITHUB_TOKEN: ${{steps.generate_token.outputs.token}} # Use GitHub App to trigger GitHub Actions Workflow by merge commit.
PR_NUMBER: ${{github.event.pull_request.number}}
pr_number: ${{github.event.pull_request.number}}
merge_method: squash
github_app_id: ${{secrets.gh_app_id}}
github_app_private_key: ${{secrets.gh_app_private_key}}

0 comments on commit 5f7ed2b

Please sign in to comment.