From bf6046ff46700a087a65cdf48c191f52d229f49f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Sep 2026 09:54:35 +0200 Subject: [PATCH 1/5] Added workflow file to trigger CI for testing pull requests (performed in a separate repository) --- .github/workflows/CI_ReSim_trigger.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/CI_ReSim_trigger.yml diff --git a/.github/workflows/CI_ReSim_trigger.yml b/.github/workflows/CI_ReSim_trigger.yml new file mode 100644 index 0000000000..9753812cee --- /dev/null +++ b/.github/workflows/CI_ReSim_trigger.yml @@ -0,0 +1,38 @@ +name: Sync_CI_Repo + +on: pull_request_target + +permissions: + contents: read + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v9 + with: + github-token: ${{ secrets.LTX_SIMULATION_TOKEN }} + script: | + const prNumber = context.payload.pull_request?.number ?? context.payload.number; + + const { data: pr } = await github.rest.pulls.get({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: prNumber, + }); + + const labels = (pr.labels || []).map(l => typeof l === 'string' ? l : l.name); + const hasLabel = labels.includes('c-code-checked'); + + await github.rest.repos.createDispatchEvent({ + owner: '${{ secrets.PRIVATE_CI_OWNER }}', + repo: '${{ secrets.PRIVATE_CI_REPO }}', + event_type: 'CI_trigger_type', + client_payload: { + number: prNumber, + head_sha: pr.head.sha, + base_sha: pr.base.sha, + has_label: hasLabel, + github_repo: context.repo.full_name + } + }); \ No newline at end of file From 600b31839abac39fe4f5870e1021bd5a44fc4dcf Mon Sep 17 00:00:00 2001 From: Matthias Schaefer <86839591+MatthiasBSchaefer@users.noreply.github.com> Date: Wed, 9 Sep 2026 10:02:44 +0200 Subject: [PATCH 2/5] Change CI trigger label from 'c-code-checked' to 'ready_for_ci', Adding author for checking membership --- .github/workflows/CI_ReSim_trigger.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_ReSim_trigger.yml b/.github/workflows/CI_ReSim_trigger.yml index 9753812cee..090472fcf1 100644 --- a/.github/workflows/CI_ReSim_trigger.yml +++ b/.github/workflows/CI_ReSim_trigger.yml @@ -22,8 +22,9 @@ jobs: }); const labels = (pr.labels || []).map(l => typeof l === 'string' ? l : l.name); - const hasLabel = labels.includes('c-code-checked'); - + const hasLabel = labels.includes('ready_for_ci'); + const author = context.payload.pull_request.user.login + await github.rest.repos.createDispatchEvent({ owner: '${{ secrets.PRIVATE_CI_OWNER }}', repo: '${{ secrets.PRIVATE_CI_REPO }}', @@ -33,6 +34,7 @@ jobs: head_sha: pr.head.sha, base_sha: pr.base.sha, has_label: hasLabel, + author: author, github_repo: context.repo.full_name } - }); \ No newline at end of file + }); From 1a266a0ef303d3af39fe9285d5762c37894affce Mon Sep 17 00:00:00 2001 From: Matthias Schaefer <86839591+MatthiasBSchaefer@users.noreply.github.com> Date: Tue, 15 Sep 2026 08:59:20 +0200 Subject: [PATCH 3/5] Modify CI workflow - add trigger for the workflow when labeling the PR - only run PR testing for PR targeting master or maint-branches - full-sha for github-script action --- .github/workflows/CI_ReSim_trigger.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI_ReSim_trigger.yml b/.github/workflows/CI_ReSim_trigger.yml index 090472fcf1..ccb3c0a93e 100644 --- a/.github/workflows/CI_ReSim_trigger.yml +++ b/.github/workflows/CI_ReSim_trigger.yml @@ -1,7 +1,11 @@ name: Sync_CI_Repo -on: pull_request_target - +on: + pull_request_target: + types: [opened, labeled, synchronize, reopened] + branches: + - master + - maint/** permissions: contents: read @@ -9,7 +13,7 @@ jobs: run: runs-on: ubuntu-latest steps: - - uses: actions/github-script@v9 + - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: github-token: ${{ secrets.LTX_SIMULATION_TOKEN }} script: | From 5898047a6261de54fea9718e0916ac4f3d9547f3 Mon Sep 17 00:00:00 2001 From: Matthias Schaefer <86839591+MatthiasBSchaefer@users.noreply.github.com> Date: Thu, 8 Oct 2026 15:48:19 +0200 Subject: [PATCH 4/5] Check which label was added In case the workflow was triggered by labeling the PR, it should only run, if the "ready_for_ci" label was added --- .github/workflows/CI_ReSim_trigger.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI_ReSim_trigger.yml b/.github/workflows/CI_ReSim_trigger.yml index ccb3c0a93e..c1f136efef 100644 --- a/.github/workflows/CI_ReSim_trigger.yml +++ b/.github/workflows/CI_ReSim_trigger.yml @@ -27,7 +27,15 @@ jobs: const labels = (pr.labels || []).map(l => typeof l === 'string' ? l : l.name); const hasLabel = labels.includes('ready_for_ci'); - const author = context.payload.pull_request.user.login + const author = context.payload.pull_request.user.login; + + const isLabeledEvent = context.payload.action === 'labeled'; + const addedLabel = context.payload.label?.name; + + if (isLabeledEvent && addedLabel !== 'ready_for_ci') { + core.info(`Ignoring label event for: ${addedLabel}`); + return; + } await github.rest.repos.createDispatchEvent({ owner: '${{ secrets.PRIVATE_CI_OWNER }}', From 44c8d0988458de14870b1992c896668155c58c1d Mon Sep 17 00:00:00 2001 From: Matthias Schaefer <86839591+MatthiasBSchaefer@users.noreply.github.com> Date: Thu, 29 Oct 2026 08:24:46 +0100 Subject: [PATCH 5/5] more meaningful name of the CI workflow --- .github/workflows/CI_ReSim_trigger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI_ReSim_trigger.yml b/.github/workflows/CI_ReSim_trigger.yml index c1f136efef..cbc3863230 100644 --- a/.github/workflows/CI_ReSim_trigger.yml +++ b/.github/workflows/CI_ReSim_trigger.yml @@ -1,4 +1,4 @@ -name: Sync_CI_Repo +name: CI_ReSim_trigger on: pull_request_target: