Skip to content

Commit e72c38f

Browse files
committed
Updated auto merge workflow
1 parent 0551bf8 commit e72c38f

File tree

2 files changed

+61
-66
lines changed

2 files changed

+61
-66
lines changed
Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
name: Dependabot - Auto Merge
2+
on: pull_request
23

3-
on:
4-
workflow_run:
5-
types: [ completed ]
6-
workflows: [ "Test Suite" ]
4+
permissions:
5+
contents: write
6+
pull-requests: write
77

88
jobs:
9-
merge-me:
10-
name: "Merge me!"
9+
dependabot:
1110
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
1212
steps:
13-
- # It is often a desired behavior to merge only when a workflow execution
14-
# succeeds. This can be changed as needed.
15-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
16-
name: Merge me!
17-
uses: ridedott/merge-me-action@v2
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
1816
with:
19-
# Depending on branch protection rules, a manually populated
20-
# `GITHUB_TOKEN_WORKAROUND` secret with permissions to push to
21-
# a protected branch must be used. This secret can have an arbitrary
22-
# name, as an example, this repository uses `DOTTBOTT_TOKEN`.
23-
#
24-
# When using a custom token, it is recommended to leave the following
25-
# comment for other developers to be aware of the reasoning behind it:
26-
#
27-
# This must be used as GitHub Actions token does not support pushing
28-
# to protected branches.
29-
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Enable auto-merge for Dependabot PRs
19+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
20+
run: gh pr merge --auto --merge "$PR_URL"
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

‎composer.lock‎

Lines changed: 45 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)