File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 - name : Checkout repository
1515 uses : actions/checkout@v4
1616 with :
17- # Needed to push changes back to the repo
18- fetch-depth : 0
17+ fetch-depth : 2
1918
2019 # Must be done before setup-node.
2120 - name : Enable Corepack
3635 id : find-json
3736 run : |
3837 # 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"
4440
4541 - name : Validate files
4642 if : env.NEW_JSON_FILES
You can’t perform that action at this time.
0 commit comments