Skip to content

Commit 634aeaa

Browse files
committed
chore: format conditions check to multiline
- for readable diff Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent 0b74423 commit 634aeaa

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

workflow-templates/dependabot-approve-merge.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,31 @@ jobs:
4646

4747
- name: Dependabot metadata
4848
id: metadata
49+
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
4950
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
5051
with:
5152
github-token: ${{ secrets.GITHUB_TOKEN }}
5253

5354
- name: GitHub actions bot approve
54-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/')
55+
id: auto_approve
56+
if: ${{
57+
startsWith(steps.branchname.outputs.branch, 'dependabot/')
58+
}}
5559
run: gh pr review --approve "$PR_URL"
5660
env:
5761
PR_URL: ${{ github.event.pull_request.html_url }}
5862
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5963

6064
# Enable GitHub auto merge
6165
- name: Auto merge
62-
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # 2.0.0
63-
if: startsWith(steps.branchname.outputs.branch, 'dependabot/') && (github.event.action == 'opened' || github.event.action == 'reopened') && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')
66+
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
67+
if: ${{
68+
startsWith(steps.branchname.outputs.branch, 'dependabot/')
69+
&& (github.event.action == 'opened' || github.event.action == 'reopened')
70+
&& (
71+
steps.metadata.outputs.update-type == 'version-update:semver-patch'
72+
|| steps.metadata.outputs.update-type == 'version-update:semver-minor'
73+
)
74+
}}
6475
with:
6576
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)