Skip to content

Commit 3e5de3a

Browse files
committed
hotfix: add local CI support
1 parent 3e40a2e commit 3e5de3a

3 files changed

Lines changed: 32 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,16 @@ jobs:
2222
with:
2323
submodules: true
2424

25-
- name: Install Rust
25+
- name: Install Rust (GitHub)
26+
if: github.server_url == 'https://github.com'
2627
uses: dtolnay/rust-toolchain@stable
2728

29+
- name: Install Rust (Forgejo)
30+
if: github.server_url != 'https://github.com'
31+
run: |
32+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
33+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
34+
2835
- name: Cache cargo
2936
uses: actions/cache@v4
3037
with:
@@ -56,9 +63,16 @@ jobs:
5663
with:
5764
submodules: true
5865

59-
- name: Install Rust
66+
- name: Install Rust (GitHub)
67+
if: github.server_url == 'https://github.com'
6068
uses: dtolnay/rust-toolchain@stable
6169

70+
- name: Install Rust (Forgejo)
71+
if: github.server_url != 'https://github.com'
72+
run: |
73+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
74+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
75+
6276
- name: Cache cargo
6377
uses: actions/cache@v4
6478
with:

.github/workflows/publish-crates.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@ jobs:
1818
with:
1919
submodules: true
2020

21-
- name: Install Rust
21+
- name: Install Rust (GitHub)
22+
if: github.server_url == 'https://github.com'
2223
uses: dtolnay/rust-toolchain@stable
2324

25+
- name: Install Rust (Forgejo)
26+
if: github.server_url != 'https://github.com'
27+
run: |
28+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
29+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
30+
2431
- name: Cache cargo
2532
uses: actions/cache@v4
2633
with:

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,16 @@ jobs:
2626
with:
2727
submodules: true
2828

29-
- name: Install Rust
29+
- name: Install Rust (GitHub)
30+
if: github.server_url == 'https://github.com'
3031
uses: dtolnay/rust-toolchain@stable
3132

33+
- name: Install Rust (Forgejo)
34+
if: github.server_url != 'https://github.com'
35+
run: |
36+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
37+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
38+
3239
- name: Cache cargo
3340
uses: actions/cache@v4
3441
with:

0 commit comments

Comments
 (0)