From 24f3c29c1c123470475feb54dcc3417d775a4c35 Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Mon, 26 Sep 2022 15:41:01 +0300 Subject: [PATCH] refine auto-merge updates --- .github/workflows/dependabot-auto-merge.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 7fa5b001..787ad39e 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -16,13 +16,13 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Wait other jobs are passed or failed - if: ${{ contains(github.event.pull_request.labels.*.name, 'pip dependencies') || contains(github.event.pull_request.labels.*.name, 'github actions') }} + if: ${{ steps.metadata.outputs.package-ecosystem == 'pip' || steps.metadata.outputs.package-ecosystem == 'github_actions' }} uses: kachick/wait-other-jobs@v1 timeout-minutes: 30 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-merge for Dependabot PRs - if: ${{ contains(github.event.pull_request.labels.*.name, 'pip dependencies') || contains(github.event.pull_request.labels.*.name, 'github actions') }} + if: ${{ steps.metadata.outputs.package-ecosystem == 'pip' || steps.metadata.outputs.package-ecosystem == 'github_actions' }} run: gh pr review --approve "$PR_URL" && gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}}