This commit is contained in:
NianBroken
2024-07-28 20:51:39 +08:00 Unverified
parent e4c21b7e22
commit c8046a0245
+10 -7
View File
@@ -16,7 +16,7 @@ on:
default: "168" default: "168"
type: string type: string
jobs: jobs:
# 检查成绩 # 删除旧的运行记录
DeleteOldRuns: DeleteOldRuns:
name: DeleteOldRuns name: DeleteOldRuns
@@ -24,6 +24,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# 判断 GITHUB_TOKEN 是否存在,如果不存在就退出
- name: Check Secret
run: |
if [ -z "$GITHUB_TOKEN" ]; then
exit 0
fi
# 使用GitHub Actions提供的动作来检出代码库 # 使用GitHub Actions提供的动作来检出代码库
- name: Checkout Repository - name: Checkout Repository
uses: actions/checkout@main uses: actions/checkout@main
@@ -85,12 +92,8 @@ jobs:
export HOUR_COUNT="${{ github.event.inputs.hour_count }}" export HOUR_COUNT="${{ github.event.inputs.hour_count }}"
fi fi
if [ -n "$GITHUB_TOKEN" ]; then python scripts/delete_old_runs.py
python scripts/delete_old_runs.py echo "------"
echo "------"
else
exit 0
fi
# 方便通过截图快速定位到用户 # 方便通过截图快速定位到用户
echo "Hour Count: $HOUR_COUNT" echo "Hour Count: $HOUR_COUNT"