From 6474eeec0bd7dea1d4d1239a8d872e9622612370 Mon Sep 17 00:00:00 2001 From: Dennis Oelkers Date: Mon, 18 Dec 2023 14:37:45 +0100 Subject: [PATCH] Do not dispatch build when PR exists. (#17717) --- .github/workflows/fix-linter-hints.yml | 4 ++-- .github/workflows/update-browserslist-db.yml | 4 ++-- .github/workflows/updating-lockfile.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fix-linter-hints.yml b/.github/workflows/fix-linter-hints.yml index 151aba6acab8..57467d41f9db 100644 --- a/.github/workflows/fix-linter-hints.yml +++ b/.github/workflows/fix-linter-hints.yml @@ -59,7 +59,7 @@ jobs: - name: Get headRef and SHA of PR id: pr-infos - if: ${{ steps.pr-create.outputs.pull-request-operation != 'closed' }} + if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }} run: | HEADREF=$(gh pr view ${{ steps.pr-create.outputs.pull-request-number }} --json headRefName --template '{{.headRefName}}') echo "sha=$(git rev-parse origin/$HEADREF)" >> $GITHUB_OUTPUT @@ -68,7 +68,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Request dispatched PR build - if: ${{ steps.pr-create.outputs.pull-request-operation != 'closed' }} + if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }} run: > gh workflow run -R Graylog2/graylog-project-internal pr-build.yml --ref master -f caller_repo=${{ github.repository }} diff --git a/.github/workflows/update-browserslist-db.yml b/.github/workflows/update-browserslist-db.yml index f2f8f5ca1782..61d2eb46672a 100644 --- a/.github/workflows/update-browserslist-db.yml +++ b/.github/workflows/update-browserslist-db.yml @@ -34,7 +34,7 @@ jobs: - name: Get headRef and SHA of PR id: pr-infos - if: ${{ steps.pr-create.outputs.pull-request-operation != 'closed' }} + if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }} run: | HEADREF=$(gh pr view ${{ steps.pr-create.outputs.pull-request-number }} --json headRefName --template '{{.headRefName}}') echo "sha=$(git rev-parse origin/$HEADREF)" >> $GITHUB_OUTPUT @@ -43,7 +43,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Request dispatched PR build - if: ${{ steps.pr-create.outputs.pull-request-operation != 'closed' }} + if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }} run: > gh workflow run -R Graylog2/graylog-project-internal pr-build.yml --ref master -f caller_repo=${{ github.repository }} diff --git a/.github/workflows/updating-lockfile.yml b/.github/workflows/updating-lockfile.yml index a0ad86e144f7..5bdaec422e57 100644 --- a/.github/workflows/updating-lockfile.yml +++ b/.github/workflows/updating-lockfile.yml @@ -31,7 +31,7 @@ jobs: - name: Get headRef and SHA of PR id: pr-infos - if: ${{ steps.pr-create.outputs.pull-request-operation != 'closed' }} + if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }} run: | HEADREF=$(gh pr view ${{ steps.pr-create.outputs.pull-request-number }} --json headRefName --template '{{.headRefName}}') echo "sha=$(git rev-parse origin/$HEADREF)" >> $GITHUB_OUTPUT @@ -40,7 +40,7 @@ jobs: GH_TOKEN: ${{ github.token }} - name: Request dispatched PR build - if: ${{ steps.pr-create.outputs.pull-request-operation != 'closed' }} + if: ${{ steps.pr-create.outputs.pull-request-number && steps.pr-create.outputs.pull-request-operation != 'closed' }} run: > gh workflow run -R Graylog2/graylog-project-internal pr-build.yml --ref master -f caller_repo=${{ github.repository }}