🔧 chore(ci): trigger superpowers sync
Trigger Superpowers Sync / Dispatch main workflow (push) Failing after 5s
Details
Trigger Superpowers Sync / Dispatch main workflow (push) Failing after 5s
Details
This commit is contained in:
parent
2f86fb1701
commit
5508cd809d
|
|
@ -0,0 +1,38 @@
|
|||
name: Trigger Superpowers Sync
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- thirdparty/skill
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: superpowers-trigger-${{ github.repository }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
name: Dispatch main workflow
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Dispatch sync workflow on main
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
TOKEN="${{ secrets.WORKFLOW }}"
|
||||
if [ -z "$TOKEN" ]; then
|
||||
echo "ERROR: WORKFLOW secret is required" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
API_BASE="${GITHUB_API_URL:-${GITHUB_SERVER_URL}/api/v1}"
|
||||
WORKFLOW_FILE="sync-superpowers.yml"
|
||||
API="${API_BASE}/repos/${GITHUB_REPOSITORY}/actions/workflows/${WORKFLOW_FILE}/dispatches"
|
||||
|
||||
curl -sSf -X POST \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"ref":"main"}' \
|
||||
"$API"
|
||||
Loading…
Reference in New Issue