From 6011afcd18d2698a7d38e259af07b1197a9b19b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ga=C5=82da?= Date: Wed, 3 Dec 2025 12:57:48 +0100 Subject: [PATCH 1/2] [nrf noup] ci: Dynamically set target branch for manifest PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dynamically set target branch for manifest PRs Signed-off-by: Jan Gałda --- .github/workflows/manifest-PR.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/manifest-PR.yml b/.github/workflows/manifest-PR.yml index 0f3bd738a36c..6e2430ec901e 100644 --- a/.github/workflows/manifest-PR.yml +++ b/.github/workflows/manifest-PR.yml @@ -4,6 +4,7 @@ on: types: [opened, synchronize, closed, reopened] branches: - main + - ncs-v*-branch permissions: contents: read @@ -11,9 +12,28 @@ permissions: jobs: call-manifest-pr-action: runs-on: ubuntu-latest + outputs: + base-branch: ${{ steps.set-base-branch.outputs.base_branch }} steps: + # Determine the base branch: + # * sdk-zephyr/main -> sdk-nrf/main + # * sdk-zephyr/ncs-vX.Y-branch -> sdk-nrf/vX.Y-branch + - name: Set base branch + id: set-base-branch + run: | + if [[ "${{ github.event.pull_request.base.ref }}" == "main" ]]; then + echo "base_branch=main" >> "$GITHUB_OUTPUT" + elif [[ "${{ github.event.pull_request.base.ref }}" =~ ^ncs-(v[0-9]+\.[0-9]+-branch)$ ]]; then + branch_name="${{ github.event.pull_request.base.ref }}" + branch_name="${branch_name#ncs-}" + echo "base_branch=${branch_name}" >> "$GITHUB_OUTPUT" + else + echo "Error: Unsupported base branch: ${{ github.event.pull_request.base.ref }}" >&2 + exit 1 + fi - name: handle manifest PR uses: nrfconnect/action-manifest-pr@main with: token: ${{ secrets.NCS_GITHUB_TOKEN }} manifest-pr-title-details: ${{ github.event.pull_request.title }} + base-branch: ${{ steps.set-base-branch.outputs.base_branch }} From ce615e1fdf3c9fdb846a6ee6ce9699f270759cd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ga=C5=82da?= Date: Fri, 5 Dec 2025 16:04:23 +0100 Subject: [PATCH 2/2] [nrf noup] ci: Use NordicBuilder to open backport PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport PRs opened by github-actions[bot] do not trigger action which opens sdk-nrf PR with manifest update Signed-off-by: Jan Gałda --- .github/workflows/backport.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 3ecf66b17da9..402341a9c389 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -33,6 +33,6 @@ jobs: - name: Backport uses: zephyrproject-rtos/action-backport@7e74f601d11eaca577742445e87775b5651a965f # v2.0.3-3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.NCS_GITHUB_TOKEN }} issue_labels: Backport labels_template: '["Backport"]'