-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (69 loc) · 3.1 KB
/
files-changed.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
name: files-changed
on:
workflow_call:
# Map the workflow outputs to job outputs
outputs:
SKIP_CI:
description: "true/false output of if we should skip CI (for the longer portions)"
value: >-
${{
( jobs.files-changed.outputs.changelog == 'true' && jobs.files-changed.outputs.changelog_count == 1 && jobs.files-changed.outputs.changed_count == 1 ) ||
( jobs.files-changed.outputs.allcontributors == 'true' && jobs.files-changed.outputs.allcontributors_count == 2 && jobs.files-changed.outputs.changed_count == 2 )
}}
allcontributors:
description: "true/false output of if the allcontributors changed"
value: ${{ jobs.files-changed.outputs.allcontributors }}
allcontributors_count:
description: "The count of all files matching the allcontributors"
value: ${{ jobs.files-changed.outputs.allcontributors_count }}
allcontributors_files:
description: "List of all files matching the allcontributors"
value: ${{ jobs.files-changed.outputs.allcontributors_files }}
changelog:
description: "true/false output of if the changelog changed"
value: ${{ jobs.files-changed.outputs.changelog }}
changelog_count:
description: "The count of all files matching the changelog"
value: ${{ jobs.files-changed.outputs.changelog_count }}
changelog_files:
description: "List of all files matching the changelog"
value: ${{ jobs.files-changed.outputs.changelog_files }}
changed:
description: "true/false output of if any changed"
value: ${{ jobs.files-changed.outputs.changed }}
changed_count:
description: "The count of all files changed"
value: ${{ jobs.files-changed.outputs.changed_count }}
changed_files:
description: "List of all files changed"
value: ${{ jobs.files-changed.outputs.changed_files }}
jobs:
files-changed:
name: detect what files changed
runs-on: ubuntu-latest
# Map the job outputs to step outputs
outputs:
allcontributors: ${{ steps.changes.outputs.allcontributors }}
allcontributors_count: ${{ steps.changes.outputs.allcontributors_count }}
allcontributors_files: ${{ steps.changes.outputs.allcontributors_files }}
changelog: ${{ steps.changes.outputs.changelog }}
changelog_count: ${{ steps.changes.outputs.changelog_count }}
changelog_files: ${{ steps.changes.outputs.changelog_files }}
changed: ${{ steps.changes.outputs.changed }}
changed_count: ${{ steps.changes.outputs.changed_count }}
changed_files: ${{ steps.changes.outputs.changed_files }}
steps:
- name: Check out repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
timeout-minutes: 1
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
allcontributors:
- '.all-contributorsrc'
- 'README.md'
changelog:
- 'CHANGELOG.md'
changed:
- '**'