-
Notifications
You must be signed in to change notification settings - Fork 22
68 lines (61 loc) · 2.64 KB
/
get-changed-files.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
name: Get Changed files
on:
workflow_call:
outputs:
component-files-changed:
description: Check if component (`src` directory) files have changed
value: ${{ jobs.get-changed-files.outputs.component-files-changed }}
docs-files-changed:
description: Check if docs (`docs` directory) files have changed
value: ${{ jobs.get-changed-files.outputs.docs-files-changed }}
components-or-docs-or-cypress-files-changed:
description: Check if src or docs (`src` or `docs` directories) files have changed
value: ${{ jobs.get-changed-files.outputs.components-or-docs-or-cypress-files-changed }}
package-json-pnpm-lock-files-changed:
description: Check if package.json or pnpm.lock files changed
value: ${{ jobs.get-changed-files.outputs.package-json-pnpm-lock-files-changed }}
jobs:
get-changed-files:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: Check changed files
runs-on: ubuntu-latest
outputs:
component-files-changed: ${{ steps.component-files-changed.outputs.any_modified }}
docs-files-changed: ${{ steps.docs-files-changed.outputs.any_modified }}
components-or-docs-or-cypress-files-changed: ${{ steps.components-or-docs-or-cypress-files-changed.outputs.any_modified }}
package-json-pnpm-lock-files-changed: ${{ steps.package-json-pnpm-lock-files-changed.outputs.any_modified }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if component (`src` directory) files have changed
uses: tj-actions/changed-files@v45
id: component-files-changed
# Return 'true' for any directories listed here that changed
with:
files: |
src/**
- name: Check if docs (`docs` directory) files have changed
uses: tj-actions/changed-files@v45
id: docs-files-changed
# Return 'true' for any directories listed here that changed
with:
files: |
docs/**
- name: Check if files changed in `src/`, `docs/`, or `cypress/` directories
uses: tj-actions/changed-files@v45
id: components-or-docs-or-cypress-files-changed
# Return 'true' for any directories listed here that changed
with:
files: |
src/**
docs/**
cypress/**
- name: Check if package.json or pnpm.lock files changed
uses: tj-actions/changed-files@v45
id: package-json-pnpm-lock-files-changed
# Return 'true' for any directories listed here that changed
with:
files: |
package.json
pnpm-lock.yaml