leds: move state notifier gpio to DTS #139
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: handle manifest PR | |
on: | |
pull_request_target: | |
types: [opened, synchronize, closed] | |
branches: | |
- main | |
jobs: | |
create-manifest-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print Github context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Read body of PR | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" /repos/${{github.repository}}/pulls/${{github.event.number}} --jq '.body' > pr_body.md | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
cache: 'pip' | |
- name: install yq | |
run: pip install yq | |
- name: Get configuration | |
id: config | |
shell: bash {0} | |
run: | | |
cat pr_body.md | |
csplit pr_body.md /\`\`\`yaml/1 | |
csplit xx01 /\`\`\`/ | |
mv xx00 configuration.yaml | |
create_pr=$(yq '.Github_actions.Create_NRF_PR' configuration.yaml) | |
if [ $? != 0 ]; then | |
echo "Did not found Create_NRF_PR in configuration, default to false." | |
echo "Create_NRF_PR=false" >> $GITHUB_OUTPUT; | |
else | |
echo "Create_NRF_PR=$create_pr" >> $GITHUB_OUTPUT; | |
fi; | |
- name: Create manifest PR | |
if: ${{ fromJson(steps.config.outputs.Create_NRF_PR) }} | |
uses: nrfconnect/action-manifest-pr@main | |
with: | |
token: ${{ secrets.NCS_GITHUB_TOKEN }} |