-
Notifications
You must be signed in to change notification settings - Fork 26
81 lines (78 loc) · 2.56 KB
/
changed-files.yaml
File metadata and controls
81 lines (78 loc) · 2.56 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
on:
workflow_call:
inputs:
files_yaml:
description: |
YAML string containing mappings of the form `{key}: [{glob1}, {glob2}, etc.]`.
Where `{key}` is an arbitrary identifier for grouping a set of changed files
(e.g. "test_cpp" for "if these files change, C++ tests should be re-run") and
each `{glob}` is a glob expression matching file paths in the calling repo.
For example, "re-run all C++ tests on any changes EXCEPT docs" might look like this:
'test_cpp: ["**", "!docs/**"]'.
type: string
required: true
transform_expr:
description: |
jq expression for post-processing results to create this workflow's outputs.
Provided for backwards compatibility; should not need to be updated with normal use.
type: string
required: false
default: |
to_entries |
map(
select(.key | endswith("_any_changed")) |
{
"key": (.key | rtrimstr("_any_changed")),
"value": .value,
}
) |
from_entries
outputs:
changed_file_groups:
value: ${{ jobs.changed-files.outputs.changed_file_groups }}
defaults:
run:
shell: bash
permissions:
actions: read
checks: none
contents: read
deployments: none
discussions: none
id-token: none
issues: none
packages: read
pages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
jobs:
changed-files:
runs-on: ubuntu-latest
name: "Check changed files"
outputs:
changed_file_groups: ${{ steps.changed-files.outputs.changed_file_groups }}
steps:
- name: Telemetry setup
uses: rapidsai/shared-actions/telemetry-dispatch-setup@main
continue-on-error: true
if: ${{ vars.TELEMETRY_ENABLED == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
- name: Checkout code repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: true
- name: Calculate changed files
id: changed-files
uses: rapidsai/shared-actions/changed-files@main
with:
files_yaml: ${{ inputs.files_yaml }}
transform_expr: ${{ inputs.transform_expr }}
- name: Telemetry upload attributes
uses: rapidsai/shared-actions/telemetry-dispatch-stash-job-artifacts@main
continue-on-error: true
if: ${{ vars.TELEMETRY_ENABLED == 'true' }}
env:
GH_TOKEN: ${{ github.token }}