mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-12 02:39:17 +00:00
Update update_json_date.yml
This commit is contained in:
parent
5736b6aa5c
commit
f6bc82e77a
8
.github/workflows/update_json_date.yml
vendored
8
.github/workflows/update_json_date.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Auto Update JSON-Dateien (new files only)
|
name: Auto Update JSON-Dates
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -25,7 +25,7 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch full history to check commit timestamps
|
fetch-depth: 0 # Fetch full history for commit checks
|
||||||
|
|
||||||
- name: Set up Git
|
- name: Set up Git
|
||||||
run: |
|
run: |
|
||||||
@ -38,7 +38,9 @@ jobs:
|
|||||||
TODAY=$(date -u +"%Y-%m-%d")
|
TODAY=$(date -u +"%Y-%m-%d")
|
||||||
> new_json_files.txt
|
> new_json_files.txt
|
||||||
|
|
||||||
for FILE in $(git ls-files --json | jq -r '.[]'); do
|
git fetch origin main --depth=1
|
||||||
|
|
||||||
|
for FILE in $(git log --since="$TODAY 00:00:00" --diff-filter=A --name-only --pretty=format: origin/main -- json/*.json || true); do
|
||||||
COMMIT_DATE=$(git log --format=%cI -- "$FILE" | tail -n 1 | cut -dT -f1)
|
COMMIT_DATE=$(git log --format=%cI -- "$FILE" | tail -n 1 | cut -dT -f1)
|
||||||
if [[ "$COMMIT_DATE" == "$TODAY" ]]; then
|
if [[ "$COMMIT_DATE" == "$TODAY" ]]; then
|
||||||
echo "$FILE" >> new_json_files.txt
|
echo "$FILE" >> new_json_files.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user