Skip to content

Commit 45d2262

Browse files
committed
Gate workflows to only run on upstream
1 parent bcf5f40 commit 45d2262

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

.github/workflows/ci.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717

1818
jobs:
1919
rust:
20+
if: github.repository == 'rust-analyzer/rust-analyzer'
2021
name: Rust
2122
runs-on: ${{ matrix.os }}
2223
env:
@@ -61,6 +62,7 @@ jobs:
6162

6263
# Weird targets to catch non-portable code
6364
rust-cross:
65+
if: github.repository == 'rust-analyzer/rust-analyzer'
6466
name: Rust Cross
6567
runs-on: ubuntu-latest
6668

@@ -97,6 +99,7 @@ jobs:
9799
done
98100
99101
typescript:
102+
if: github.repository == 'rust-analyzer/rust-analyzer'
100103
name: TypeScript
101104
strategy:
102105
fail-fast: false

.github/workflows/metrics.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212

1313
jobs:
1414
metrics:
15+
if: github.repository == 'rust-analyzer/rust-analyzer'
1516
runs-on: ubuntu-latest
1617

1718
steps:

.github/workflows/release.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,12 @@ jobs:
247247
working-directory: ./editors/code
248248

249249
- name: Publish Extension (release)
250-
if: github.ref == 'refs/heads/release'
250+
if: github.ref == 'refs/heads/release' && github.repository == 'rust-analyzer/rust-analyzer'
251251
working-directory: ./editors/code
252252
# token from https://dev.azure.com/rust-analyzer/
253253
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix
254254

255255
- name: Publish Extension (nightly)
256-
if: github.ref != 'refs/heads/release'
256+
if: github.ref != 'refs/heads/release' && github.repository == 'rust-analyzer/rust-analyzer'
257257
working-directory: ./editors/code
258258
run: npx vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix --pre-release

.github/workflows/rustdoc.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ env:
1212

1313
jobs:
1414
rustdoc:
15+
if: github.repository == 'rust-analyzer/rust-analyzer'
1516
runs-on: ubuntu-latest
1617

1718
steps:

0 commit comments

Comments
 (0)