-
Notifications
You must be signed in to change notification settings - Fork 52
64 lines (61 loc) · 2.06 KB
/
reusable-change-detection.yml
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
name: Change detection
on:
workflow_call:
outputs:
run-cookie:
description: Whether or not run the cookiecutter tests
value: ${{ jobs.change-detection.outputs.run-cookie || false }}
run-rr:
description: Whether or not run the repo-review tests
value: ${{ jobs.change-detection.outputs.run-rr || false }}
jobs:
change-detection:
name: Identify source changes
runs-on: ubuntu-latest
timeout-minutes: 1
outputs:
run-cookie: ${{ steps.cookie-changes.outputs.run-cookie || false }}
run-rr: ${{ steps.rr-changes.outputs.run-rr || false }}
steps:
- uses: actions/checkout@v4
- name: Changed cookie-related files
if: github.event_name == 'pull_request'
id: changed-cookie-files
uses: Ana06/[email protected]
with:
format: "json"
filter: |
{{cookiecutter.project_name}}/**
.github/workflows/ci.yml
.github/workflows/reusable-cookie.yml
noxfile.py
hooks/**
cookiecutter.json
copier.yml
extensions.py
- name: Set a flag for running the tests
if: >-
github.event_name != 'pull_request' ||
steps.changed-cookie-files.outputs.added_modified_renamed != '[]'
id: cookie-changes
run: echo "run-cookie=true" >> "${GITHUB_OUTPUT}"
- name: Changed sp-repo-review-related files
if: github.event_name == 'pull_request'
id: changed-rr-files
uses: Ana06/[email protected]
with:
format: "json"
filter: |
.github/workflows/ci.yml
.github/workflows/reusable-rr-tests.yml
README.md
noxfile.py
pyproject.toml
src/**
tests/**
- name: Set a flag for running the tests
if: >-
github.event_name != 'pull_request' ||
steps.changed-rr-files.outputs.added_modified_renamed != '[]'
id: rr-changes
run: echo "run-rr=true" >> "${GITHUB_OUTPUT}"