2021-10-06 04:08:38 +00:00
|
|
|
###########################################################
|
|
|
|
# Description: Compile OpenWrt by GitHub Actions #
|
|
|
|
# Based on: https://github.com/P3TERX/Actions-OpenWrt #
|
|
|
|
# Author: Hyy2001X #
|
|
|
|
###########################################################
|
|
|
|
|
2021-11-14 07:49:49 +00:00
|
|
|
name: Refresh API
|
2021-10-06 04:08:38 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
refresh_switch:
|
|
|
|
description: '刷新 Release/API'
|
|
|
|
default: 'true'
|
|
|
|
|
2021-10-22 07:12:32 +00:00
|
|
|
schedule:
|
|
|
|
- cron: 0 4,16 * * *
|
|
|
|
|
2021-10-06 04:08:38 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
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
|
2021-10-22 07:12:32 +00:00
|
|
|
overwrite: true
|
|
|
|
|
|
|
|
- name: Delete old Workflow Runs
|
|
|
|
uses: GitRML/delete-workflow-runs@main
|
|
|
|
with:
|
|
|
|
retain_days: 1
|
|
|
|
keep_minimum_runs: 1
|