Skip to content

Commit 5dec45f

Browse files
committed
Code review fixes
1 parent 565f637 commit 5dec45f

2 files changed

Lines changed: 25 additions & 14 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ jobs:
112112

113113
- name: 📤 Publish to Cloudflare Pages
114114
id: cloudflare
115+
continue-on-error: ${{ github.event_name != 'push' }}
115116
env:
116117
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
117118
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
@@ -220,7 +221,9 @@ jobs:
220221
221222
- name: ✂ Strip template from completed build for a clean artifact
222223
if: github.event_name == 'push'
223-
run: sed -i "s|${{ steps.production-env.outputs.template }}||" frontend/dist/index.html
224+
env:
225+
TEMPLATE: ${{ steps.production-env.outputs.template }}
226+
run: sed -i "s|$TEMPLATE||" frontend/dist/index.html
224227

225228
- name: 📦 Upload web bundle artifact
226229
if: github.event_name != 'pull_request'

.github/workflows/check.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,32 @@ env:
88
CARGO_TERM_COLOR: always
99

1010
jobs:
11+
# Check if CI can be skipped (for merge queue deduplication)
12+
skip-check:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
skip: ${{ steps.check.outputs.skip-check }}
16+
steps:
17+
- name: 📥 Clone repository
18+
uses: actions/checkout@v6
19+
20+
- name: 🚦 Check if CI can be skipped
21+
id: check
22+
uses: cariad-tech/merge-queue-ci-skipper@main
23+
1124
# Build the web app via the shared build workflow
1225
build:
26+
needs: skip-check
27+
if: needs.skip-check.outputs.skip != 'true'
1328
uses: ./.github/workflows/build.yml
1429
secrets: inherit
1530
with:
1631
web: true
1732

1833
# Run the Rust tests on the self-hosted native runner
1934
test:
35+
needs: skip-check
36+
if: needs.skip-check.outputs.skip != 'true'
2037
runs-on: [self-hosted, target/native]
2138
env:
2239
RUSTC_WRAPPER: /usr/bin/sccache
@@ -26,12 +43,7 @@ jobs:
2643
- name: 📥 Clone repository
2744
uses: actions/checkout@v6
2845

29-
- name: 🚦 Check if CI can be skipped
30-
id: skip-check
31-
uses: cariad-tech/merge-queue-ci-skipper@main
32-
3346
- name: 🦀 Install Rust
34-
if: steps.skip-check.outputs.skip-check != 'true'
3547
uses: actions-rust-lang/setup-rust-toolchain@v1
3648
with:
3749
toolchain: stable
@@ -40,28 +52,23 @@ jobs:
4052
rustflags: ""
4153

4254
- name: 🦀 Fetch Rust dependencies
43-
if: steps.skip-check.outputs.skip-check != 'true'
4455
run: cargo fetch --locked
4556

4657
- name: 🧪 Run Rust tests
47-
if: steps.skip-check.outputs.skip-check != 'true'
4858
env:
4959
RUSTFLAGS: -Dwarnings
5060
run: mold -run cargo test --all-features
5161

5262
# Rust format check on GitHub runner
5363
rust-fmt:
64+
needs: skip-check
65+
if: needs.skip-check.outputs.skip != 'true'
5466
runs-on: ubuntu-latest
5567
steps:
5668
- name: 📥 Clone repository
5769
uses: actions/checkout@v6
5870

59-
- name: 🚦 Check if CI can be skipped
60-
id: skip-check
61-
uses: cariad-tech/merge-queue-ci-skipper@main
62-
6371
- name: 🦀 Install Rust
64-
if: steps.skip-check.outputs.skip-check != 'true'
6572
uses: actions-rust-lang/setup-rust-toolchain@v1
6673
with:
6774
toolchain: stable
@@ -71,11 +78,12 @@ jobs:
7178
components: rustfmt
7279

7380
- name: 🔬 Check Rust formatting
74-
if: steps.skip-check.outputs.skip-check != 'true'
7581
run: cargo fmt --all -- --check
7682

7783
# License compatibility check on GitHub runner
7884
check-licenses:
85+
needs: skip-check
86+
if: needs.skip-check.outputs.skip != 'true'
7987
runs-on: ubuntu-latest
8088
steps:
8189
- name: 📥 Clone repository

0 commit comments

Comments
 (0)