Merge pull request #157 from JohnsonRan/workflows

ci: optimize workflow runs
This commit is contained in:
senshinya
2025-07-15 11:39:25 +08:00
committed by GitHub
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

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