Skip to content

Commit 71f46b9

Browse files
committed
ci: fix rust lint job to be required
1 parent 3d1e478 commit 71f46b9

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/rust.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ jobs:
2020
with:
2121
paths_ignore: '["docs/**", "*.md"]'
2222

23+
lint_pre_job:
24+
runs-on: ubuntu-22.04
25+
outputs:
26+
should_skip_lint: ${{ steps.skip_check_lint.outputs.should_skip }}
27+
steps:
28+
- id: skip_check_lint
29+
uses: fkirc/skip-duplicate-actions@c449d86cf33a2a6c7a4193264cc2578e2c3266d4 # pin@v4
30+
with:
31+
paths: '["**/*.rs", "**/Cargo.toml", "Cargo.lock", "s/lint"]'
32+
2333
build:
2434
needs: pre_job
2535
if: needs.pre_job.outputs.should_skip != 'true' || startsWith(github.ref, 'refs/tags/')
@@ -273,8 +283,8 @@ jobs:
273283
NETLIFY_SITE_ID: ${{ secrets.PLAYGROUND_NETLIFY_SITE_ID }}
274284

275285
lint:
276-
needs: pre_job
277-
if: needs.pre_job.outputs.should_skip != 'true'
286+
needs: lint_pre_job
287+
if: needs.lint_pre_job.outputs.should_skip_lint != 'true'
278288

279289
runs-on: ubuntu-22.04
280290

0 commit comments

Comments
 (0)