Skip to content

Commit

Permalink
Workflows: Re-enable manually triggered workflows on forks (#32821)
Browse files Browse the repository at this point in the history
* Remove repository checks

Most of these job are only run manually anyway, so we shouldn't need to prohibit them from running on forks.
Furthermore, these checks make it much harder to test changes to this workflow on a fork.
See #32114 (comment)

* Run build job only on manual trigger, or on gutenberg repo

* Only run compute-stable-branches branch if triggered manually
  • Loading branch information
ockham authored and sarayourfriend committed Jul 15, 2021
1 parent 1630d72 commit 519b72a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
compute-stable-branches:
name: Compute current and next stable release branches
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
outputs:
current_stable_branch: ${{ steps.get_branches.outputs.current_stable_branch }}
next_stable_branch: ${{ steps.get_branches.outputs.next_stable_branch }}
Expand All @@ -47,7 +48,6 @@ jobs:
runs-on: ubuntu-latest
needs: compute-stable-branches
if: |
github.repository == 'WordPress/gutenberg' &&
github.event_name == 'workflow_dispatch' && (
(
github.ref == 'refs/heads/trunk' ||
Expand Down Expand Up @@ -148,7 +148,12 @@ jobs:
name: Build Release Artifact
runs-on: ubuntu-latest
needs: bump-version
if: ${{ ( github.repository == 'WordPress/gutenberg' && always() ) || ( github.event_name == 'pull_request' && always() ) }}
if: |
always() && (
github.event_name == 'pull_request' ||
github.event_name == 'workflow_dispatch' ||
github.repository == 'WordPress/gutenberg'
)
steps:
- name: Checkout code
Expand Down Expand Up @@ -200,7 +205,6 @@ 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
Expand Down

0 comments on commit 519b72a

Please sign in to comment.