Skip to content

Commit

Permalink
Update dependabot-auto-merge.yaml (#251)
Browse files Browse the repository at this point in the history
* Update dependabot-auto-merge.yaml

* Update dependabot-auto-merge.yaml

* Update dependabot-auto-merge.yaml
  • Loading branch information
Starefossen authored Dec 4, 2023
1 parent 2a59128 commit 4aa70bb
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/dependabot-auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@ permissions:
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@v2.1.0
id: app-token
uses: actions/create-github-app-token@v1
with:
app_id: "${{ secrets.DEPENDABOT_AUTO_MERGE_APP_ID}}"
private_key: "${{ secrets.DEPENDABOT_AUTO_MERGE_APP_SECRET }}"

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
app-id: ${{ secrets.DEPENDABOT_AUTO_MERGE_APP_ID}}
private-key: ${{ secrets.DEPENDABOT_AUTO_MERGE_APP_SECRET }}

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

- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type != 'version-update:semver-major'
#if: steps.metadata.outputs.update-type != 'version-update:semver-major'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 4aa70bb

Please sign in to comment.