-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (39 loc) · 1.28 KB
/
run.yml
File metadata and controls
45 lines (39 loc) · 1.28 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
45
name: 刷步数
on:
workflow_dispatch:
#schedule:
#- cron: 0 2 * * *
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Up
run: |
pip install requests
pmode='${{ secrets.PMODE }}'
pkey='${{ secrets.PKEY }}'
user='${{ secrets.USER }}'
pwd='${{ secrets.PWD }}'
step='${{ secrets.STEP }}'
python3 main.py ${pmode} ${pkey} ${user} ${pwd} ${step}
- name: Update Time
run: |
time=$(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')
sed -i "s/^最后一次运行时间:.*/最后一次运行时间: $time (北京时间) /g" README.md
- name: Git push assets to Github
run: |
git init
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git branch -m master
git add --all
git commit -m "Updated at $(TZ=UTC-8 date +'%Y-%m-%d %H:%M:%S')(北京时间)"
git push -u origin -f