mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-21 00:44:41 +08:00
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:
12
.github/workflows/sync.yml
vendored
12
.github/workflows/sync.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user