Skip to content

Commit

Permalink
ci: please woork automerge
Browse files Browse the repository at this point in the history
  • Loading branch information
Rei-x committed Jan 7, 2024
1 parent 6512d41 commit d613eb7
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@ name: Dependabot auto-merge
on: pull_request

permissions:
contents: read
pull-requests: read
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: github.actor == 'dependabot[bot]'
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}

- name: Authenticate cli
run: echo "${{ steps.generate_token.outputs.token }}" | gh auth login --with-token

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.CI_GITHUB_TOKEN}}

0 comments on commit d613eb7

Please sign in to comment.