File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : handle manifest PR
2+ on :
3+ pull_request_target :
4+ types : [opened, synchronize, closed, reopened]
5+ branches :
6+ - main
7+ - ncs-v*-branch
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ call-manifest-pr-action :
14+ runs-on : ubuntu-latest
15+ outputs :
16+ base-branch : ${{ steps.set-base-branch.outputs.base_branch }}
17+ 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
33+ fi
34+ - name : handle manifest PR
35+ uses : nrfconnect/action-manifest-pr@main
36+ with :
37+ token : ${{ secrets.NCS_GITHUB_TOKEN }}
38+ manifest-pr-title-details : ${{ github.event.pull_request.title }}
39+ base-branch : ${{ steps.set-base-branch.outputs.base_branch }}
You can’t perform that action at this time.
0 commit comments