0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed duplicate workflow executions on PRs

- if we push to a branch, and open a PR, we'll get duplicate executions
- this fixes that by adding the same check we have elsewhere in the
  workflow
This commit is contained in:
Daniel Lockyer 2023-07-04 12:20:01 +02:00 committed by Daniel Lockyer
parent 7e6c0ec87e
commit f2c2e7f687

View file

@ -27,6 +27,7 @@ jobs:
job_get_metadata: job_get_metadata:
name: Metadata name: Metadata
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
permissions: permissions:
pull-requests: read pull-requests: read
steps: steps:
@ -99,6 +100,7 @@ jobs:
job_install_deps: job_install_deps:
name: Install Dependencies name: Install Dependencies
needs: job_get_metadata needs: job_get_metadata
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 15 timeout-minutes: 15
steps: steps:
@ -770,7 +772,7 @@ jobs:
job_comments_ui, job_comments_ui,
job_signup_form, job_signup_form,
] ]
if: always() if: always() && (github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/')))
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check for failures - name: Check for failures