Repository navigation
58 lines (51 loc) · 1.96 KB
/
Copy pathdoc-changed.yml
File metadata and controls
58 lines (51 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Doc changed
# description: |
# Tells a documentation workflow whether a pull request touches the doc site, so it can
# skip its build (or its markdown/spellcheck lint) while still reporting a status.
#
# Replaces markdown-changed.yml, which reported only "some markdown changed", relied on
# tj-actions/changed-files, needed a checkout, and had no fallback when detection failed.
#
# Detection FAILS OPEN: see changed-paths.yml, which does the actual work.
permissions:
contents: read
pull-requests: read
on:
workflow_call:
inputs:
extra-paths:
description: |
Extra glob patterns to watch on top of the doc preset, one per line.
The preset follows the go-openapi layout: markdown anywhere, content under
docs/doc-site, hugo configuration and themes under hack/doc-site. A repository
that keeps its content elsewhere declares it here, e.g. go-swagger:
extra-paths: |
docs/**
type: string
required: false
default: ''
force:
description: |
Set to 'true' to bypass detection and always report 'changed=true'.
Use it for scheduled or manually dispatched runs, and as the opt-out for
repositories that do not want path-based skipping.
type: string
required: false
default: 'false'
outputs:
changed:
description: |
'true' when a documentation path changed, or when detection could not be trusted.
'false' only when we positively established that no doc path changed.
value: ${{ jobs.doc-changed.outputs.changed }}
reason:
description: 'Plain English explanation of how the decision was reached.'
value: ${{ jobs.doc-changed.outputs.reason }}
jobs:
doc-changed:
name: doc changed
uses: ./.github/workflows/changed-paths.yml
with:
preset: doc
extra-paths: ${{ inputs.extra-paths }}
force: ${{ inputs.force }}