From 1aef48486c1f65319c6c52bfba7c5a1d959201d3 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 16 Dec 2023 09:18:38 -0500 Subject: [PATCH] improve dependabot auto-merge workflow to be more succinct and readable --- .github/workflows/dependabot-auto-merge.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 60183c5..471c054 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -18,22 +18,15 @@ jobs: github-token: "${{ secrets.GITHUB_TOKEN }}" compat-lookup: true - - name: Auto-merge Dependabot PRs for semver-minor updates - if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} + - name: Auto-merge Dependabot PRs for semver-minor/patch updates + if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}} run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - name: Auto-merge Dependabot PRs for semver-patch updates - if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} - run: gh pr merge --auto --merge "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - - name: Auto-merge Dependabot PRs for Action major versions when compatibility is higher than 90% - if: ${{steps.metadata.outputs.package-ecosystem == 'github_actions' && steps.metadata.outputs.update-type == 'version-update:semver-major' && steps.metadata.outputs.compatibility-score >= 90}} + - name: Auto-merge Dependabot PRs for GitHub Actions (compatibility >= 90%) + if: ${{steps.metadata.outputs.package-ecosystem == 'github_actions' && steps.metadata.outputs.compatibility-score >= 90}} run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}}