Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-04-21 21:36:28 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-04-21 21:36:28 +0300
commitb86473df027f691dd31ff35f57051ea667b11c03 (patch)
tree1e4d3b0d6bac739b991c026864aefbbf59089f0f /.github
parent15be803da982ab362f6859c0ec91a582c4b1fea6 (diff)
Run cache cleanup daily and reduce cutoff to 1 day
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/cleanup_caches.yml12
1 files changed, 6 insertions, 6 deletions
diff --git a/.github/workflows/cleanup_caches.yml b/.github/workflows/cleanup_caches.yml
index dcf50fce..b7d8fc1a 100644
--- a/.github/workflows/cleanup_caches.yml
+++ b/.github/workflows/cleanup_caches.yml
@@ -1,7 +1,7 @@
name: Cleanup Caches
on:
schedule:
- - cron: '0 3 * * 0' # every Sunday
+ - cron: "0 3 * * *" # every day
workflow_dispatch:
jobs:
@@ -10,16 +10,16 @@ jobs:
permissions:
actions: write
steps:
- - name: Delete caches older than 3 days
+ - name: Delete caches older than 1 day
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- CUTOFF_DATE=$(date -d "3 days ago" -Ins --utc | sed 's/+0000/Z/')
+ CUTOFF_DATE=$(date -d "1 days ago" -Ins --utc | sed 's/+0000/Z/')
echo "Deleting caches older than: $CUTOFF_DATE"
-
+
CACHE_IDS=$(gh api --paginate repos/${{ github.repository }}/actions/caches \
--jq ".actions_caches[] | select(.last_accessed_at < \"$CUTOFF_DATE\") | .id" 2>/dev/null)
-
+
if [ -z "$CACHE_IDS" ]; then
echo "No old caches found to delete."
else
@@ -28,4 +28,4 @@ jobs:
gh api -X DELETE repos/${{ github.repository }}/actions/caches/$CACHE_ID
done
echo "Old caches deleted successfully."
- fi \ No newline at end of file
+ fi