Skip to content

Commit 2bac442

Browse files
authored
ci: fix for forks (#433)
* ci: fix for forks * ci: add libglib2.0-bin install to typescript action * blah
1 parent bd51cda commit 2bac442

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

.github/workflows/mdbook.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
# Build job
2929
build:
3030
runs-on: ubuntu-latest
31+
if: github.event.repository.fork == false
3132
env:
3233
MDBOOK_VERSION: 0.4.36
3334
steps:
@@ -49,11 +50,12 @@ jobs:
4950

5051
# Deployment job
5152
deploy:
53+
runs-on: ubuntu-latest
54+
if: github.event.repository.fork == false
55+
needs: build
5256
environment:
5357
name: github-pages
5458
url: ${{ steps.deployment.outputs.page_url }}
55-
runs-on: ubuntu-latest
56-
needs: build
5759
steps:
5860
- name: Deploy to GitHub Pages
5961
id: deployment

.github/workflows/rust.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ jobs:
8080
run: cargo +nightly llvm-cov --locked --workspace --codecov --output-path lcov.info
8181
- name: Upload coverage to Codecov
8282
uses: codecov/codecov-action@v5
83+
if: github.event.repository.fork == false
8384
with:
84-
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
85+
token: ${{ secrets.CODECOV_TOKEN }}
8586
files: lcov.info
8687
fail_ci_if_error: true
8788
env_vars: OS

.github/workflows/typescript.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
timeout-minutes: 30
1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Install protobuf compiler
19-
run: sudo apt-get update && sudo apt-get install -y -qq protobuf-compiler
18+
- name: Install protobuf compiler and libglib2.0
19+
run: sudo apt-get update && sudo apt-get install -y -qq protobuf-compiler libglib2.0-dev-bin
2020
- name: Cache .turbo folder
2121
uses: actions/cache@v4
2222
with:
@@ -38,6 +38,7 @@ jobs:
3838
- run: pnpm run test:ci
3939
- name: Upload coverage to Codecov
4040
uses: codecov/codecov-action@v5
41+
if: github.event.repository.fork == false
4142
with:
4243
token: ${{ secrets.CODECOV_TOKEN }}
4344
files: coverage/lcov.info
@@ -51,16 +52,6 @@ jobs:
5152
- uses: actions/checkout@v4
5253
- name: Install protobuf compiler
5354
run: sudo apt-get update && sudo apt-get install -y -qq protobuf-compiler
54-
- name: Install the Buf CLI
55-
uses: bufbuild/buf-setup-action@v1
56-
with:
57-
github_token: ${{ github.token }}
58-
- name: Cache .turbo folder
59-
uses: actions/cache@v4
60-
with:
61-
path: .turbo
62-
key: turbo-lint-${{ runner.os }}-${{ github.sha }}
63-
restore-keys: turbo-lint-${{ runner.os }}-
6455
- name: Install pnpm
6556
uses: pnpm/action-setup@v4
6657
with:

0 commit comments

Comments
 (0)