diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ee4f605..c9d9205 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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 }} \ No newline at end of file + 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 \ No newline at end of file diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 160dd5d..b9ff148 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file