mirror of
https://github.com/halfwaystudent/douyin-sparkflow.git
synced 2026-09-08 17:09:11 +08:00
ci: make manual checks non-sending by default
This commit is contained in:
@@ -2,6 +2,12 @@ name: DouYin Spark Flow Schedule Run
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
run_task:
|
||||||
|
description: "Run the real Douyin send task after checks"
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 2 * * *" # 10:00 Asia/Shanghai
|
- cron: "0 2 * * *" # 10:00 Asia/Shanghai
|
||||||
|
|
||||||
@@ -40,8 +46,10 @@ jobs:
|
|||||||
status="$(curl -sS -o /dev/null -w '%{http_code}' --max-time 30 https://creator.douyin.com/)"
|
status="$(curl -sS -o /dev/null -w '%{http_code}' --max-time 30 https://creator.douyin.com/)"
|
||||||
test "$status" != "000"
|
test "$status" != "000"
|
||||||
- name: Ensure Chromium is installed
|
- name: Ensure Chromium is installed
|
||||||
|
if: ${{ github.event_name == 'schedule' || inputs.run_task }}
|
||||||
run: playwright install chromium --with-deps --only-shell
|
run: playwright install chromium --with-deps --only-shell
|
||||||
- name: Run DouYin Spark Flow
|
- name: Run DouYin Spark Flow
|
||||||
|
if: ${{ github.event_name == 'schedule' || inputs.run_task }}
|
||||||
env:
|
env:
|
||||||
USER_DATA: ${{ secrets.USER_DATA }}
|
USER_DATA: ${{ secrets.USER_DATA }}
|
||||||
SPARKFLOW_BROWSER_PROFILE_ROOT: ${{ runner.temp }}/douyin-sparkflow-browser-profiles
|
SPARKFLOW_BROWSER_PROFILE_ROOT: ${{ runner.temp }}/douyin-sparkflow-browser-profiles
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ class DeploymentContractTests(unittest.TestCase):
|
|||||||
self.assertIn("SPARKFLOW_BROWSER_PROFILE_ROOT", text)
|
self.assertIn("SPARKFLOW_BROWSER_PROFILE_ROOT", text)
|
||||||
self.assertIn("SPARKFLOW_MANUAL_RUN", text)
|
self.assertIn("SPARKFLOW_MANUAL_RUN", text)
|
||||||
self.assertIn('USER_DATA: "[]"', text)
|
self.assertIn('USER_DATA: "[]"', text)
|
||||||
|
self.assertIn("run_task:", text)
|
||||||
|
self.assertGreaterEqual(text.count("github.event_name == 'schedule' || inputs.run_task"), 2)
|
||||||
self.assertIn("path: DouYinSparkFlow/logs/", text)
|
self.assertIn("path: DouYinSparkFlow/logs/", text)
|
||||||
|
|
||||||
def test_github_actions_are_pinned_to_commit_shas(self):
|
def test_github_actions_are_pinned_to_commit_shas(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user