mirror of
https://github.com/k3s-io/k3s.git
synced 2026-04-12 04:46:28 -04:00
Some checks are pending
Scorecard supply-chain security / Scorecard analysis (push) Waiting to run
Signed-off-by: Rafael Breno <rafael_breno@outlook.com>
34 lines
1.2 KiB
Bash
Executable file
34 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
set -x
|
|
|
|
# The ref (branch or tag) to run the workflow on.
|
|
REF_TAG="$DRONE_TAG"
|
|
|
|
# --- k3s-io/k3s-upgrade ---
|
|
|
|
# API endpoint to target 'create-tag-on-dispatch.yml' directly
|
|
REPO_API_URL="https://api.github.com/repos/k3s-io/k3s-upgrade/actions/workflows/create-tag-on-dispatch.yml/dispatches"
|
|
|
|
# Send workflow_dispatch event
|
|
curl -L -XPOST \
|
|
-H "Accept: application/vnd.github+json" \
|
|
-H "Authorization: Bearer ${PAT_TOKEN}" \
|
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
-H "Content-Type: application/json" \
|
|
"$REPO_API_URL" \
|
|
--data "{\"ref\":\"$REF_TAG\", \"inputs\": {\"tag\":\"$REF_TAG\"}}"
|
|
|
|
# --- rancher/system-agent-installer-k3s ---
|
|
|
|
# API endpoint to target 'create-tag-on-dispatch.yml' directly
|
|
SYSTEM_AGENT_API_URL="https://api.github.com/repos/rancher/system-agent-installer-k3s/actions/workflows/create-tag-on-dispatch.yml/dispatches"
|
|
|
|
# Send workflow_dispatch event
|
|
curl -L -XPOST \
|
|
-H "Accept: application/vnd.github+json" \
|
|
-H "Authorization: Bearer ${K3S_RELEASE_TOKEN}" \
|
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
-H "Content-Type: application/json" \
|
|
"$SYSTEM_AGENT_API_URL" \
|
|
--data "{\"ref\":\"$REF_TAG\", \"inputs\": {\"tag\":\"$REF_TAG\"}}"
|