From 519b72a0ebece343c6fcf1d52d2168e85cf6e428 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 7 Jul 2021 17:30:17 +0200 Subject: [PATCH] Workflows: Re-enable manually triggered workflows on forks (#32821) * 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 https://github.com/WordPress/gutenberg/pull/32114#issuecomment-864013314 * Run build job only on manual trigger, or on gutenberg repo * Only run compute-stable-branches branch if triggered manually --- .github/workflows/build-plugin-zip.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index b88059c56e44c..df11d86f673f8 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -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 }} @@ -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' || @@ -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 @@ -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