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

@@ -40,4 +40,14 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/moontv:latest
ghcr.io/${{ github.repository_owner }}/moontv:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/moontv:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- 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