-
Notifications
You must be signed in to change notification settings - Fork 18
35 lines (29 loc) · 1 KB
/
dev_demo.yml
File metadata and controls
35 lines (29 loc) · 1 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
on:
schedule:
- cron: '0 6 * * 3'
jobs:
run_python_script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: 安装依赖环境
run: |
pip install -r requirements.txt
- name: 获取参数
id: get_variables
run: |
WORKFLOW_PATH="${{ github.workflow }}"
WORKFLOW_NAME=$(basename $WORKFLOW_PATH)
WORKFLOW_NAME=${WORKFLOW_NAME/\.yml/}
WORKFLOW_NAME=${WORKFLOW_NAME/.*/}
WORKFLOW_NAME=${WORKFLOW_NAME^^}
echo "WORKFLOW_NAME=$WORKFLOW_NAME" >> $GITHUB_OUTPUT
- name: 运行Python脚本
run: |
echo "${{ steps.get_variables.outputs.WORKFLOW_NAME }}"
python DevRunTrigger.py ${{ secrets.HAMIBOT_TOKEN }} '${{ vars.HAMIBOT_PARAS }}' ${{ steps.get_variables.outputs.WORKFLOW_NAME }} ${{ vars.WECHAT_UID }}