File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1- name : Auto Update JSON-Dateien (new files only)
1+ name : Auto Update JSON-Dates
22
33on :
44 push :
2525 - name : Checkout repository
2626 uses : actions/checkout@v4
2727 with :
28- fetch-depth : 0 # Fetch full history to check commit timestamps
28+ fetch-depth : 0 # Fetch full history for commit checks
2929
3030 - name : Set up Git
3131 run : |
3838 TODAY=$(date -u +"%Y-%m-%d")
3939 > new_json_files.txt
4040
41- for FILE in $(git ls-files --json | jq -r '.[]'); do
41+ git fetch origin main --depth=1
42+
43+ for FILE in $(git log --since="$TODAY 00:00:00" --diff-filter=A --name-only --pretty=format: origin/main -- json/*.json || true); do
4244 COMMIT_DATE=$(git log --format=%cI -- "$FILE" | tail -n 1 | cut -dT -f1)
4345 if [[ "$COMMIT_DATE" == "$TODAY" ]]; then
4446 echo "$FILE" >> new_json_files.txt
You can’t perform that action at this time.
0 commit comments