再次修复
This commit is contained in:
@@ -6,6 +6,11 @@ on:
|
||||
- cron: "17 * * * *"
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force_push:
|
||||
description: "强制推送当前公告"
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
|
||||
jobs:
|
||||
@@ -13,26 +18,27 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install
|
||||
run: pip install -r requirements.txt
|
||||
- run: pip install -r requirements.txt
|
||||
|
||||
- name: Run monitor
|
||||
env:
|
||||
PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }}
|
||||
FORCE_PUSH: ${{ inputs.force_push }}
|
||||
run: python main.py
|
||||
|
||||
- name: Commit state
|
||||
- name: Commit state UTC
|
||||
run: |
|
||||
git config user.name "gitea-actions"
|
||||
git config user.email "actions@localhost"
|
||||
|
||||
git add data/state.json
|
||||
git diff --cached --quiet || git commit -m "update cet state"
|
||||
|
||||
git diff --cached --quiet || git commit -m "update cet state $(date -u '+%Y-%m-%dT%H:%M:%SZ')"
|
||||
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user