Skip to content

Commit

Permalink
Do not dispatch build when PR exists. (#17717)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisoelkers authored Dec 18, 2023
1 parent bf6299c commit 6474eee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/fix-linter-hints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-browserslist-db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/updating-lockfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit 6474eee

Please sign in to comment.