🔧 chore(ci): automate superpowers sync workflow
Update Third-party Superpowers / Update thirdparty/skill snapshot (push) Successful in 1m19s Details

run the thirdparty superpowers snapshot updater on a daily schedule.

trigger sync-superpowers automatically when thirdparty/skill is updated and cover the new automation with workflow tests.
This commit is contained in:
csh 2026-03-12 10:25:59 +08:00
parent eaaa39c39b
commit 51373d7469
3 changed files with 15 additions and 0 deletions

View File

@ -1,6 +1,9 @@
name: Sync Superpowers Skills name: Sync Superpowers Skills
on: on:
push:
branches:
- thirdparty/skill
workflow_dispatch: workflow_dispatch:
concurrency: concurrency:

View File

@ -5,6 +5,8 @@ on:
branches: branches:
- main - main
workflow_dispatch: workflow_dispatch:
schedule:
- cron: "@daily"
concurrency: concurrency:
group: thirdparty-superpowers-update-${{ github.repository }} group: thirdparty-superpowers-update-${{ github.repository }}

View File

@ -13,6 +13,11 @@ class SuperpowersWorkflowTests(unittest.TestCase):
text = SYNC_WORKFLOW.read_text(encoding="utf-8") text = SYNC_WORKFLOW.read_text(encoding="utf-8")
self.assertIn("workflow_dispatch:", text) self.assertIn("workflow_dispatch:", text)
def test_sync_workflow_triggers_on_thirdparty_push(self):
text = SYNC_WORKFLOW.read_text(encoding="utf-8")
self.assertIn("push:", text)
self.assertIn("- thirdparty/skill", text)
def test_sync_workflow_clears_stale_index_flags(self): def test_sync_workflow_clears_stale_index_flags(self):
text = SYNC_WORKFLOW.read_text(encoding="utf-8") text = SYNC_WORKFLOW.read_text(encoding="utf-8")
self.assertIn("git update-index --no-assume-unchanged", text) self.assertIn("git update-index --no-assume-unchanged", text)
@ -33,6 +38,11 @@ class SuperpowersWorkflowTests(unittest.TestCase):
self.assertIn("- main", text) self.assertIn("- main", text)
self.assertIn("workflow_dispatch:", text) self.assertIn("workflow_dispatch:", text)
def test_auto_update_workflow_runs_daily_schedule(self):
text = AUTO_UPDATE_WORKFLOW.read_text(encoding="utf-8")
self.assertIn("schedule:", text)
self.assertIn('- cron: "@daily"', text)
def test_auto_update_workflow_runs_update_script(self): def test_auto_update_workflow_runs_update_script(self):
text = AUTO_UPDATE_WORKFLOW.read_text(encoding="utf-8") text = AUTO_UPDATE_WORKFLOW.read_text(encoding="utf-8")
self.assertIn("bash .gitea/ci/update_thirdparty_superpowers.sh", text) self.assertIn("bash .gitea/ci/update_thirdparty_superpowers.sh", text)