mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-04-26 09:26:07 +00:00
Run cache cleanup daily and reduce cutoff to 1 day
This commit is contained in:
parent
15be803da9
commit
b86473df02
1 changed files with 6 additions and 6 deletions
6
.github/workflows/cleanup_caches.yml
vendored
6
.github/workflows/cleanup_caches.yml
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
name: Cleanup Caches
|
name: Cleanup Caches
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 3 * * 0' # every Sunday
|
- cron: "0 3 * * *" # every day
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -10,11 +10,11 @@ jobs:
|
||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- name: Delete caches older than 3 days
|
- name: Delete caches older than 1 day
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
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"
|
echo "Deleting caches older than: $CUTOFF_DATE"
|
||||||
|
|
||||||
CACHE_IDS=$(gh api --paginate repos/${{ github.repository }}/actions/caches \
|
CACHE_IDS=$(gh api --paginate repos/${{ github.repository }}/actions/caches \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue