File tree 1 file changed +3
-7
lines changed
1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 14
14
- name : Checkout repository
15
15
uses : actions/checkout@v4
16
16
with :
17
- # Needed to push changes back to the repo
18
- fetch-depth : 0
17
+ fetch-depth : 2
19
18
20
19
# Must be done before setup-node.
21
20
- name : Enable Corepack
36
35
id : find-json
37
36
run : |
38
37
# Get the list of added JSON files in the records/new/ directory
39
- ADDED_FILES=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} --diff-filter=A --name-only | grep '^records/new/.*\.json$' || true)
40
- echo "NEW_JSON_FILES=$ADDED_FILES" >> $GITHUB_ENV
41
- if [ -z "$ADDED_FILES" ]; then
42
- echo "No new JSON files found."
43
- fi
38
+ ADDED_FILES=$(git diff HEAD^..HEAD --diff-filter=A --name-only records/new | grep '/.*\.json$' || true)
39
+ echo "NEW_JSON_FILES=$ADDED_FILES" >> "$GITHUB_ENV"
44
40
45
41
- name : Validate files
46
42
if : env.NEW_JSON_FILES
You can’t perform that action at this time.
0 commit comments