From 349c5b6b0d3172e3a6af37eee5927d60ea2b40c0 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <desrosj@users.noreply.github.com> Date: Mon, 7 Jun 2021 15:08:49 -0400 Subject: [PATCH 1/2] Limit when release artifacts are built on forks. Previously in #32114, adjustments were made to GHA workflow files to limit when workflows ran on forked repositories. But this missed the second job in the workflow that builds the release artifact. Because it was set to always run even though the previous job is required, it has continued to run on forks. --- .github/workflows/build-plugin-zip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index 94e5743082eaa5..fb60dcb540c232 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -111,7 +111,7 @@ jobs: name: Build Release Artifact runs-on: ubuntu-latest needs: bump-version - if: always() + if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} steps: - name: Checkout code From 5d2c7f8bfcccafe26f61f9b83eb8320274d3931e Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers <desrosj@users.noreply.github.com> Date: Mon, 7 Jun 2021 15:12:45 -0400 Subject: [PATCH 2/2] Ensure the artifact is built always, even when the preceding job does not run. --- .github/workflows/build-plugin-zip.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-plugin-zip.yml b/.github/workflows/build-plugin-zip.yml index fb60dcb540c232..613d7c6c0479cd 100644 --- a/.github/workflows/build-plugin-zip.yml +++ b/.github/workflows/build-plugin-zip.yml @@ -111,7 +111,7 @@ jobs: name: Build Release Artifact runs-on: ubuntu-latest needs: bump-version - if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }} + if: ${{ ( github.repository == 'WordPress/gutenberg' && always() ) || ( github.event_name == 'pull_request' && always() ) }} steps: - name: Checkout code