From cbd33f96017d926192d27601e81bf30a84b0cb3c Mon Sep 17 00:00:00 2001 From: Ross Wollman Date: Fri, 31 Jul 2020 14:09:36 -0700 Subject: [PATCH] devops: avoid running publish on external contrib (#3257) Everytime I sync my fork to upstream, I get failure notifications: ``` Run failed for master (3edfb2a) Repository: rwoll/playwright Workflow: devrelease Duration: 10 minutes and 34.0 seconds Finished: 2020-07-31 18:30:13 UTC ``` Since forks should never have the necessary secrets to publish the npm and Docker packages, we limit the running of these jobs to avoid noisy failures for contributors. --- .github/workflows/publish_canary_docker.yml | 1 + .github/workflows/publish_canary_npm.yml | 1 + .github/workflows/publish_release.yml | 2 ++ 3 files changed, 4 insertions(+) diff --git a/.github/workflows/publish_canary_docker.yml b/.github/workflows/publish_canary_docker.yml index b183a1c841..4d7b230560 100644 --- a/.github/workflows/publish_canary_docker.yml +++ b/.github/workflows/publish_canary_docker.yml @@ -13,6 +13,7 @@ jobs: publish-canary-docker: name: "publish to DockerHub" runs-on: ubuntu-18.04 + if: github.repository == 'microsoft/playwright' steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 diff --git a/.github/workflows/publish_canary_npm.yml b/.github/workflows/publish_canary_npm.yml index 97f31bedc5..d2b1eb2484 100644 --- a/.github/workflows/publish_canary_npm.yml +++ b/.github/workflows/publish_canary_npm.yml @@ -13,6 +13,7 @@ jobs: publish-canary-npm: name: "publish to NPM" runs-on: ubuntu-18.04 + if: github.repository == 'microsoft/playwright' steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index d43a78fba8..a1ed7e0c75 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -11,6 +11,7 @@ jobs: publish-npm-release: name: "publish to NPM" runs-on: ubuntu-18.04 + if: github.repository == 'microsoft/playwright' steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 @@ -27,6 +28,7 @@ jobs: publish-docker-release: name: "publish to DockerHub" runs-on: ubuntu-18.04 + if: github.repository == 'microsoft/playwright' steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1