From 32f3074273bae509fcbecb7e16589ffd2912d48f Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 8 Nov 2023 10:42:30 +0700 Subject: [PATCH] chore(linux): Fix GHA triggering When we build a PR on TC we use `pull/ID/head` for the build, not `pull/ID/merge`, i.e. the tip of the feature branch and not a merge with the base branch. This means that during the build `pull/ID/merge` is unknown. This change modifies the trigger to use `pull/ID/head` for GHA builds as well. It's still a mystery why `pull/ID/merge` was known to builds in most cases but failed for some PRs. --- resources/build/trigger-builds.inc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/build/trigger-builds.inc.sh b/resources/build/trigger-builds.inc.sh index a8cbcfd4d88..dd950f1c512 100644 --- a/resources/build/trigger-builds.inc.sh +++ b/resources/build/trigger-builds.inc.sh @@ -79,7 +79,7 @@ function triggerGitHubActionsBuild() { GIT_HEAD_SHA="${GIT_BUILD_SHA}" GIT_EVENT_TYPE="${GITHUB_ACTION}: release@${VERSION_WITH_TAG}" elif [[ $GIT_BRANCH != stable-* ]] && [[ $GIT_BRANCH =~ [0-9]+ ]]; then - GIT_BUILD_SHA="$(git rev-parse "refs/pull/${GIT_BRANCH}/merge")" + GIT_BUILD_SHA="$(git rev-parse "refs/pull/${GIT_BRANCH}/head")" GIT_HEAD_SHA="$(git rev-parse "refs/pull/${GIT_BRANCH}/head")" GIT_EVENT_TYPE="${GITHUB_ACTION}: PR #${GIT_BRANCH}" GIT_BRANCH="PR-${GIT_BRANCH}"