File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 44 types : [opened, synchronize, closed, reopened]
55 branches :
66 - main
7+ - ncs-v*-branch
78
89permissions :
910 contents : read
1011
1112jobs :
1213 call-manifest-pr-action :
1314 runs-on : ubuntu-latest
15+ outputs :
16+ base-branch : ${{ steps.set-base-branch.outputs.base_branch }}
1417 steps :
18+ # Determine the base branch:
19+ # * sdk-zephyr/main -> sdk-nrf/main
20+ # * sdk-zephyr/ncs-vX.Y-branch -> sdk-nrf/vX.Y-branch
21+ - name : Set base branch
22+ id : set-base-branch
23+ run : |
24+ if [[ "${{ github.event.pull_request.base.ref }}" == "main" ]]; then
25+ echo "base_branch=main" >> "$GITHUB_OUTPUT"
26+ elif [[ "${{ github.event.pull_request.base.ref }}" =~ ^ncs-(v[0-9]+\.[0-9]+-branch)$ ]]; then
27+ branch_name="${{ github.event.pull_request.base.ref }}"
28+ branch_name="${branch_name#ncs-}"
29+ echo "base_branch=${branch_name}" >> "$GITHUB_OUTPUT"
30+ else
31+ echo "Error: Unsupported base branch: ${{ github.event.pull_request.base.ref }}" >&2
32+ exit 1
1533 - name : handle manifest PR
1634 uses : nrfconnect/action-manifest-pr@main
1735 with :
1836 token : ${{ secrets.NCS_GITHUB_TOKEN }}
1937 manifest-pr-title-details : ${{ github.event.pull_request.title }}
38+ base-branch : ${{ steps.set-base-branch.outputs.base_branch }}
You can’t perform that action at this time.
0 commit comments