Update .forgejo/workflows/generate-m3u.yml
Some checks failed
Generate M3U Playlist with Auto-Organization / build-and-organize (push) Failing after 1m32s
Some checks failed
Generate M3U Playlist with Auto-Organization / build-and-organize (push) Failing after 1m32s
This commit is contained in:
parent
d6d08ce4aa
commit
983bf0673a
1 changed files with 3 additions and 3 deletions
|
@ -122,11 +122,11 @@ jobs:
|
|||
- name: Archive Old Reports
|
||||
run: |
|
||||
echo "Managing archives..."
|
||||
# Archive reports older than 7 days
|
||||
CUTOFF_DATE=$(date -d '7 days ago' +%s 2>/dev/null || date -v-7d +%s 2>/dev/null || echo "0")
|
||||
# Archive reports older than 7 days - using GNU date format for Ubuntu
|
||||
CUTOFF_DATE=$(date -d '7 days ago' +%s)
|
||||
for report_file in reports/daily/playlist_report_*.md reports/daily/report_*.md; do
|
||||
if [ -f "$report_file" ]; then
|
||||
FILE_DATE=$(stat -c %Y "$report_file" 2>/dev/null || stat -f %m "$report_file" 2>/dev/null || echo "0")
|
||||
FILE_DATE=$(stat -c %Y "$report_file" 2>/dev/null || echo "0")
|
||||
if [ "$FILE_DATE" -lt "$CUTOFF_DATE" ] && [ "$FILE_DATE" -gt "0" ]; then
|
||||
BASENAME=$(basename "$report_file")
|
||||
REPORT_DATE=$(echo "$BASENAME" | sed 's/.*_//; s/\.md//; s/\(....\)\(..\)\(..\).*/\1-\2/')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue