Skip to content

Commit 197e761

Browse files
committed
fix(ci): adjust run conditions for approve-merge steps
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent 0d51b99 commit 197e761

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/dependabot-approve-merge.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ jobs:
6565
fi
6666
6767
# GitHub actions bot approve
68-
- uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
68+
- name: Auto approve
69+
id: auto_approve
70+
uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
6971
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]'
7072
&& steps.validate.outputs.ignore != 'true'
71-
&& ((env.ALLOW_MINOR && steps.metadata.outputs.update-type == 'version-update:semver-minor')
73+
&& ((fromJSON(env.ALLOW_MINOR) && steps.metadata.outputs.update-type == 'version-update:semver-minor')
7274
|| steps.metadata.outputs.update-type == 'version-update:semver-patch')
7375
}}
7476
with:
@@ -77,6 +79,6 @@ jobs:
7779
# Enable GitHub auto merge
7880
- name: Auto merge
7981
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # v2.0.0
80-
if: github.event.pull_request.user.login == 'dependabot[bot]'
82+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && steps.auto_approve.conclusion == 'success' }}
8183
with:
8284
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)