优化 workflows

This commit is contained in:
Hyy2001X
2021-11-21 22:02:55 +08:00
parent 30fb28f762
commit 376c35b1ac
8 changed files with 68 additions and 52 deletions
+44
View File
@@ -0,0 +1,44 @@
###########################################################
# Description: Refresh Release API #
# Author: Hyy2001X #
###########################################################
name: Refresh API
on:
repository_dispatch:
workflow_dispatch:
inputs:
refresh_switch:
description: '手动刷新 API'
default: 'true'
schedule:
- cron: 0 4,16 * * *
jobs:
Job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Download Github Release API
run: |
wget https://api.github.com/repos/${{github.repository}}/releases/tags/AutoUpdate -O API
- name: Upload API to Github Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./API
file_glob: true
tag: AutoUpdate
overwrite: true
- name: Delete old Workflow Runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 1