Skip to content

Commit 90bcdb7

Browse files
committed
fix docs only CI job processing
Signed-off-by: David Justice <[email protected]>
1 parent 0dadb6b commit 90bcdb7

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

.github/workflows/ValidatePullRequest.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,60 @@ name: Validate Pull Request
55
on:
66
pull_request:
77
branches: [main, "release/**"]
8-
paths-ignore:
9-
- '**.md'
10-
- '**.txt'
118
merge_group:
129

1310
permissions:
1411
id-token: write
1512
contents: read
1613

1714
jobs:
15+
docs-pr:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
not-just-docs: ${{ steps.not-just-docs.outputs.result }}
19+
steps:
20+
- uses: dorny/paths-filter@v3
21+
id: changes
22+
with:
23+
filters: |
24+
docs:
25+
- '**/*.md'
26+
- '**/*.txt'
27+
all:
28+
- '**/*'
29+
- uses: actions/github-script@v7
30+
id: not-just-docs
31+
with:
32+
script: |
33+
let docs_file_count = "${{steps.changes.outputs.docs_count}}";
34+
let all_file_count = "${{steps.changes.outputs.all_count}}";
35+
let result = (all_file_count - docs_file_count) > 0;
36+
console.log(result)
37+
result-encoding: string
1838

1939
rust:
40+
needs:
41+
- docs-pr
2042
uses: ./.github/workflows/dep_rust.yml
2143
secrets: inherit
44+
with:
45+
docs_only: ${{needs.docs-pr.outputs.not-just-docs != 'true'}}
2246
fuzzing:
47+
needs:
48+
- docs-pr
2349
uses: ./.github/workflows/dep_fuzzing.yml
2450
with:
2551
max_total_time: 300 # 5 minutes in seconds
52+
docs_only: ${{needs.docs-pr.outputs.not-just-docs != 'true'}}
2653
secrets: inherit
2754

2855
#####
2956
# start build-on-windows
3057
#####
3158
build-on-windows:
59+
needs:
60+
- docs-pr
61+
if: ${{needs.docs-pr.outputs.not-just-docs == 'true'}}
3262
runs-on: ${{ matrix.os }}
3363
strategy:
3464
fail-fast: true
@@ -72,6 +102,9 @@ jobs:
72102
# start build-on-linux
73103
#####
74104
build-on-linux:
105+
needs:
106+
- docs-pr
107+
if: ${{needs.docs-pr.outputs.not-just-docs == 'true'}}
75108
runs-on: ${{ matrix.os }}
76109
strategy:
77110
fail-fast: true

.github/workflows/dep_fuzzing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ on:
77
description: Maximum total time for the fuzz run in seconds
88
required: true
99
type: number
10+
docs_only:
11+
description: If docs only, don't fuzz, just complete successfully
12+
required: false
13+
type: string
14+
default: "false"
1015

1116
permissions:
1217
id-token: write
1318
contents: read
1419

1520
jobs:
1621
fuzz:
22+
if: ${{ inputs.docs_only == 'false' }}
1723
runs-on: [ self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd" ]
1824
steps:
1925
- name: Checkout code

.github/workflows/dep_rust.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ name: Rust Tests and Lints
55
# See README.md in this directory for more information about workflow_call
66
on:
77
workflow_call:
8+
inputs:
9+
docs_only:
10+
description: If docs only, don't fuzz, just complete successfully
11+
required: false
12+
type: string
13+
default: "false"
814

915
env:
1016
CARGO_TERM_COLOR: always
@@ -16,6 +22,7 @@ permissions:
1622

1723
jobs:
1824
build:
25+
if: ${{ inputs.docs_only == 'false' }}
1926
strategy:
2027
fail-fast: true
2128
matrix:

0 commit comments

Comments
 (0)