forked from Hyy2001X/AutoBuild-Actions-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.08 KB
/
Copy pathModule-Refresh_API.yml
File metadata and controls
44 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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