CI CTT: name the branch of the CTT repository that is dispatched

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Roman Ettlinger
2026-10-16 14:02:15 +02:00
parent 957a0b6969
commit 6a2ec70dda
+3 -2
View File
@@ -31,6 +31,7 @@ concurrency:
env:
CTT_REPO: OPCFoundation/UA-.NETStandard-CTT
CTT_REPO_BRANCH: main # branch of CTT_REPO whose workflow runs
CTT_LABEL: ctt
jobs:
@@ -106,8 +107,8 @@ jobs:
api() { curl -fsSL -H "Authorization: Bearer $(token)" -H 'Accept: application/vnd.github+json' "$@"; }
base="https://api.github.com/repos/$CTT_REPO/actions"
correlation="ua-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"
jq -n --arg repo "$GITHUB_REPOSITORY" --arg ref "$REF" --arg sha "$SHA" --arg corr "$correlation" \
'{ref: "main", inputs: {ua_repository: $repo, ua_ref: $ref, expected_sha: $sha, correlation_id: $corr}}' \
jq -n --arg branch "$CTT_REPO_BRANCH" --arg repo "$GITHUB_REPOSITORY" --arg ref "$REF" --arg sha "$SHA" \
--arg corr "$correlation" '{ref: $branch, inputs: {ua_repository: $repo, ua_ref: $ref, expected_sha: $sha, correlation_id: $corr}}' \
| api -X POST "$base/workflows/ctt.yml/dispatches" --data @-
id=''