File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 44 schedule :
55 - cron : ' 0 10 * * *' # Daily at 10:00 UTC which is 2:00 AM PST (UTC-8)
66 workflow_dispatch :
7+ push :
78
89jobs :
910 delete_release_assets :
@@ -21,15 +22,15 @@ jobs:
2122 run : |
2223
2324 # Define 60 days in seconds (60 * 24 * 60 * 60 = 5184000)
24- 60_DAYS_IN_SECONDS =5184000
25+ CUTOFF_SECONDS =5184000
2526
2627 # Find assets older than 60 days in the 'dev-wheels' release and pipe their names to xargs for deletion.
2728 gh release view dev-wheels --json assets | \
28- jq -r --argjson cutoff_seconds "$60_DAYS_IN_SECONDS " '
29+ jq -r --argjson cutoff_seconds "$CUTOFF_SECONDS " '
2930 (now - $cutoff_seconds) as $cutoff |
3031 # Iterate over the assets in the single release
3132 .assets[] |
3233 # Select assets older than the cutoff
3334 select((.createdAt | fromdateiso8601) < $cutoff) |
3435 .name
35- ' | xargs -L1 gh release delete-asset dev-wheels
36+ ' | xargs -r gh release delete-asset dev-wheels
You can’t perform that action at this time.
0 commit comments