Do not run specialized workflow on forks

This commit is contained in:
sagudev 2023-02-24 17:46:21 +01:00
parent 1208fd298d
commit 4a7075b0db
5 changed files with 18 additions and 0 deletions

View file

@ -7,6 +7,8 @@ on:
jobs:
upload-docs:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload docs to GitHub Pages
runs-on: ubuntu-20.04
steps:

View file

@ -12,6 +12,8 @@ env:
jobs:
build-linux-with-rust-nightly:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Build (Linux) + rustc nightly
runs-on: ubuntu-20.04
steps:

View file

@ -12,6 +12,8 @@ env:
jobs:
upload-linux:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Linux)
runs-on: ubuntu-20.04
steps:
@ -33,6 +35,8 @@ jobs:
S3_UPLOAD_CREDENTIALS: ${{ secrets.S3_UPLOAD_CREDENTIALS }}
upload-mac:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (macOS)
runs-on: macos-12
steps:
@ -74,6 +78,8 @@ jobs:
GITHUB_HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
upload-win:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Upload nightly (Windows)
runs-on: windows-2019
steps:

View file

@ -5,6 +5,8 @@ on:
jobs:
upstream:
# Run job only on servo/servo
if: github.repository == 'servo/servo'
runs-on: ubuntu-latest
steps:
- name: Calculate PR fetch depth

View file

@ -10,6 +10,8 @@ on:
jobs:
build-linux:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Build on Linux
runs-on: ubuntu-20.04
steps:
@ -36,6 +38,8 @@ jobs:
path: target.tar.gz
linux-wpt:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Linux WPT Tests
runs-on: ubuntu-20.04
needs: ["build-linux"]
@ -82,6 +86,8 @@ jobs:
wpt-jsonsummary.${{ matrix.chunk_id }}.log
sync:
# This job is only useful when run on upstream servo.
if: github.repository == 'servo/servo' || github.event_name == 'workflow_dispatch'
name: Synchronize WPT Nightly
runs-on: ubuntu-latest
needs: