mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-20 21:07:30 +08:00
Merge pull request #157 from JohnsonRan/workflows
ci: optimize workflow runs
This commit is contained in:
10
.github/workflows/docker-image.yml
vendored
10
.github/workflows/docker-image.yml
vendored
@@ -41,3 +41,13 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ github.repository_owner }}/moontv:latest
|
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
|
||||||
10
.github/workflows/sync.yml
vendored
10
.github/workflows/sync.yml
vendored
@@ -5,7 +5,7 @@ permissions:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 4 * * *" # At 12PM UTC+8
|
- cron: "0 */6 * * *" # run every 6 hours
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -34,3 +34,11 @@ jobs:
|
|||||||
run: |
|
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."
|
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