删除旧固件 #250
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# | |
# 说明: | |
# | |
# ‘删除在github空间的老固件’ 删除12小时之前的一切固件,保留数设置没效,一删除就会把在删除时间段内的固件全部删除 | |
# | |
# ‘删除自动发布的老固件’ 每次启动都生效,可以设置保留数 | |
# | |
# 下面的开关控制,仅在手动按钮启动时候生效,定时启动的话默认全开 | |
name: 删除旧固件 | |
on: | |
schedule: | |
- cron: 0 8 * * * | |
jobs: | |
del_runs: | |
runs-on: Ubuntu-20.04 | |
name: delete-workflow-runs | |
steps: | |
- name: 删除在github空间的老固件 | |
uses: Mattraks/delete-workflow-runs@main | |
with: | |
token: ${{ github.token }} | |
repository: ${{ github.repository }} | |
retain_days: 0.5 | |
keep_minimum_runs: 0 | |
- name: 删除自动发布的老固件 | |
uses: dev-drprasad/[email protected] | |
with: | |
keep_latest: 1 #保留多少个发布不删除 | |
delete_tags: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |