Skip to content

Commit

Permalink
Limit when workflows run on forks (#32114)
Browse files Browse the repository at this point in the history
  • Loading branch information
desrosj authored Jun 2, 2021
1 parent 2e49196 commit 435dde4
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
name: Bump version
runs-on: ubuntu-latest
if: |
github.repository == 'WordPress/gutenberg' &&
github.event_name == 'workflow_dispatch' &&
github.ref == 'refs/heads/trunk' && (
github.event.inputs.version == 'rc' ||
Expand Down Expand Up @@ -169,6 +170,8 @@ jobs:
name: Create Release Draft and Attach Asset
needs: [bump-version, build]
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}

steps:
- name: Set Release Version
id: get_release_version
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
checks:
name: Checks
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ concurrency:
jobs:
admin:
name: Admin - ${{ matrix.part }}

runs-on: ubuntu-latest

if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ concurrency:
jobs:
performance:
name: Run performance tests

runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name: Pull request automation
jobs:
pull-request-automation:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
steps:
# Checkout defaults to using the branch which triggered the event, which
# isn't necessarily `trunk` (e.g. in the case of a merge).
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:
jobs:
test:
runs-on: macos-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
matrix:
native-test-name: [gutenberg-editor-initial-html]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ concurrency:
jobs:
test:
runs-on: macos-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
matrix:
xcode: [12.2]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale-issue-add-needs-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
steps:
- uses: actions/stale@996798eb71ef485dc4c7b4d3285842d714040c4a # v3.0.17
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale-issue-mark-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
steps:
- uses: actions/stale@996798eb71ef485dc4c7b4d3285842d714040c4a # v3.0.17
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale-issue-needs-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
steps:
- uses: actions/stale@996798eb71ef485dc4c7b4d3285842d714040c4a # v3.0.17
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ concurrency:
jobs:
check:
name: All

runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/storybook-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
steps:
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
unit-js:
name: JavaScript
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -59,8 +61,8 @@ jobs:

unit-php:
name: PHP

runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
Expand Down Expand Up @@ -101,8 +103,8 @@ jobs:

mobile-unit-js:
name: Mobile

runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
Expand Down

0 comments on commit 435dde4

Please sign in to comment.