diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 866dd75760..00f7c18b09 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,11 @@ ## CI parameters +(branch, hash, pull/XXX/head) NRF_revision=main +(true, false) +Create_NRF_PR=false + ## Description JIRA ticket: diff --git a/.github/workflows/on-pr_nrf_manifest_update_PR.yml b/.github/workflows/on-pr_nrf_manifest_update_PR.yml new file mode 100644 index 0000000000..c7644b4184 --- /dev/null +++ b/.github/workflows/on-pr_nrf_manifest_update_PR.yml @@ -0,0 +1,30 @@ +name: handle manifest PR +on: + pull_request_target: + types: [opened, synchronize, closed] + branches: + - main + +jobs: + create-manifest-pr: + runs-on: ubuntu-latest + steps: + - name: Read body of PR + run: printf "%s\n" "${{ github.event.pull_request.body }}" > pr_body.md + + - name: Get nrf revision + id: config + shell: bash {0} + run: | + grep -oP "(Create_NRF_PR=)(true|false)" pr_body.md > config + if [ $? != 0 ]; then + echo "Create_NRF_PR=false" >> $GITHUB_OUTPUT; + else + cat config >> $GITHUB_OUTPUT; + fi; + + - name: Create manifest PR + if: ${{steps.config.outcome.Create_NRF_PR == 'true' }} + uses: nrfconnect/action-manifest-pr@main + with: + token: ${{ secrets.NCS_GITHUB_TOKEN }}