ci: optimize workflow runs

- Add Docker build cache for faster builds
- Increase sync frequency from daily to every 6 hours
- keep latest 3 workflow runs only
Signed-off-by: JohnsonRan <me@ihtw.moe>
This commit is contained in:
JohnsonRan
2025-07-15 11:15:20 +08:00
parent 656c1c256f
commit 2f4b4a2815
2 changed files with 21 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ permissions:
on:
schedule:
- cron: "0 4 * * *" # At 12PM UTC+8
- cron: "0 */6 * * *" # run every 6 hours
workflow_dispatch:
jobs:
@@ -33,4 +33,12 @@ jobs:
if: failure()
run: |
echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork."
exit 1
exit 1
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
retain_days: 0
keep_minimum_runs: 2