-
-
Notifications
You must be signed in to change notification settings - Fork 28
47 lines (39 loc) · 1.31 KB
/
gen_storm.yml
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
45
46
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Gen storm
on:
schedule:
- cron: '0 0 * * 1'
# push:
# branches:
# - main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# 使用别人封装好的的action,用于clone该仓库的源码到工作流中
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f stormlevel/requirements.txt ]; then pip install -r stormlevel/requirements.txt; fi
- name: 'Gen storm'
run: python stormlevel/action.py
- name: Add Diff
run: git add .
- name: Commit files
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions"
git commit -m "bot fetch stormLevel File" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{secrets.TOKEN}}
branch: main