mirror of
https://github.com/GrandDuke1106/AutoApiSS.git
synced 2024-12-30 12:36:22 -05:00
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
#AutoApiS 多功能版
|
|
name: Auto Api Super
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
# branches:
|
|
# - master
|
|
schedule:
|
|
- cron: '0 1,5,8 * * 1-5'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Set up Python #安装python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.9
|
|
- name: Install requests #安装requests
|
|
run: |
|
|
pip install requests
|
|
- name: Read config from secrets #读取机密
|
|
env:
|
|
ID_LIST: ${{ secrets.ID_LIST }} # secrets_id 提供
|
|
KEY_LIST: ${{ secrets.KEY_LIST }} # secrets_key 提供
|
|
ID_LIST2: ${{ secrets.ID_LIST2 }} # secrets_id 提供
|
|
KEY_LIST2: ${{ secrets.KEY_LIST2 }} # secrets_key 提供
|
|
run: |
|
|
echo $ID_LIST > idlist.txt
|
|
echo $KEY_LIST > keylist.txt
|
|
sed -i '10 r idlist.txt' testapi.py
|
|
sed -i '11 r keylist.txt' testapi.py
|
|
echo $ID_LIST2 > idlist2.txt
|
|
echo $KEY_LIST2 > keylist2.txt
|
|
sed -i '12 r idlist2.txt' testapi.py
|
|
sed -i '13 r keylist2.txt' testapi.py
|
|
- name: Test Api #Api调用
|
|
run: |
|
|
python testapi.py
|