From 65c74e508ee42992f47319e31383e3238fcc603e Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Tue, 12 Mar 2024 02:17:12 +0000 Subject: [PATCH] Run merge in valdation job --- .github/workflows/pr.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index eefc65eafa..30c7d87b67 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -126,29 +126,28 @@ jobs: ok: timeout-minutes: 3 - needs: [rust, rust-crates, linkerd-install] + needs: [meta, rust, rust-crates, linkerd-install] if: always() runs-on: ubuntu-latest + + permissions: + contents: write + pull-requests: write + steps: - name: Results run: | echo 'needs.rust.result: ${{ needs.rust.result }}' echo 'needs.rust-crates.result: ${{ needs.rust-crates.result }}' echo 'needs.linkerd-install.result: ${{ needs.linkerd-install.result }}' + - name: Verify jobs # All jobs must succeed or be skipped. if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') run: exit 1 - merge-dependabot: - needs: [meta, ok] - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - name: 'Merge PR #${{ github.event.pull_request.number }}' - if: needs.meta.outputs.is_dependabot == 'true' + - name: 'Merge dependabot changes' + if: needs.meta.outputs.is_dependabot == 'true' && needs.meta.outputs.any_changed == 'true' run: gh pr merge '${{ github.event.pull_request.number }}' --auto --squash env: GH_TOKEN: ${{ github.token }}