From 8434ca3bf1e335869782457a7ee6fa58f49bde9b Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Fri, 20 Dec 2019 11:15:06 +0000 Subject: [PATCH] Bug 1603623 [wpt PR 20758] - GitHub Actions: Work around #20700, a=testonly Automatic update from web-platform-tests GitHub Actions: Work around #20700 (#20758) Make sure workflows always contain at least one job even on a fork. Only skip the steps that require secrets instead of the whole jobs. -- wpt-commits: 5b2b39346928ecd59e558ef409520dd85a209bea wpt-pr: 20758 UltraBlame original commit: 314f4676fb056eaef449492c95139951de82bae6 --- .../tests/.github/workflows/detect_pull_request_preview.yml | 1 + .../web-platform/tests/.github/workflows/documentation.yml | 2 ++ testing/web-platform/tests/.github/workflows/epochs.yml | 4 ++-- testing/web-platform/tests/.github/workflows/manifest.yml | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/testing/web-platform/tests/.github/workflows/detect_pull_request_preview.yml b/testing/web-platform/tests/.github/workflows/detect_pull_request_preview.yml index d35105d9e3e88..02870d8c7d223 100644 --- a/testing/web-platform/tests/.github/workflows/detect_pull_request_preview.yml +++ b/testing/web-platform/tests/.github/workflows/detect_pull_request_preview.yml @@ -1,4 +1,5 @@ name: pr-preview-detect +# This workflow triggers on deployment, which can never happen on a fork. on: deployment jobs: detect-deployment: diff --git a/testing/web-platform/tests/.github/workflows/documentation.yml b/testing/web-platform/tests/.github/workflows/documentation.yml index 9352fb81e2c5f..b8bf7972b0f76 100644 --- a/testing/web-platform/tests/.github/workflows/documentation.yml +++ b/testing/web-platform/tests/.github/workflows/documentation.yml @@ -21,6 +21,8 @@ jobs: with: fetch-depth: 50 - name: Run website_build.sh + # Use a conditional step instead of a conditional job to work around #20700. + if: github.repository == 'web-platform-tests/wpt' uses: ./tools/docker/documentation env: DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} diff --git a/testing/web-platform/tests/.github/workflows/epochs.yml b/testing/web-platform/tests/.github/workflows/epochs.yml index 78aaf16d18a43..a605a818c5f39 100644 --- a/testing/web-platform/tests/.github/workflows/epochs.yml +++ b/testing/web-platform/tests/.github/workflows/epochs.yml @@ -6,13 +6,13 @@ on: - cron: 10 */3 * * * jobs: update: - # Do not run this job on forks. - if: github.repository == "web-platform-tests/wpt" runs-on: ubuntu-18.04 steps: - name: Checkout uses: actions/checkout@v1 - name: Run epochs_update.sh + # Use a conditional step instead of a conditional job to work around #20700. + if: github.repository == 'web-platform-tests/wpt' run: ./tools/ci/epochs_update.sh env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/testing/web-platform/tests/.github/workflows/manifest.yml b/testing/web-platform/tests/.github/workflows/manifest.yml index 555b9d6c2903c..84983a57e077b 100644 --- a/testing/web-platform/tests/.github/workflows/manifest.yml +++ b/testing/web-platform/tests/.github/workflows/manifest.yml @@ -19,6 +19,8 @@ jobs: sudo apt-get -qqy install zstd pip install -r tools/wpt/requirements.txt - name: Run manifest_build.py + # Use a conditional step instead of a conditional job to work around #20700. + if: github.repository == 'web-platform-tests/wpt' run: tools/docker/retry.py --delay 60 python tools/ci/manifest_build.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}