Skip to content

Commit dfb3886

Browse files
committed
wip
1 parent ec6496f commit dfb3886

File tree

2 files changed

+36
-18
lines changed

2 files changed

+36
-18
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
uses: ./asset-tracker-template/.github/actions/build-step
133133
with:
134134
memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }}
135-
memfault_fw_type: ${{ inputs.memfault_fw_type }}
135+
memfault_fw_type: ${{ inputs.memfault_fw_type }}
136136
memfault_fw_version_prefix: ${{ env.MEMFAULT_FW_VERSION_PREFIX }}
137137
board: nrf9151dk/nrf9151/ns
138138
short_board: nrf9151dk
@@ -145,13 +145,13 @@ jobs:
145145
uses: ./asset-tracker-template/.github/actions/build-step
146146
with:
147147
memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }}
148-
memfault_fw_type: ${{ inputs.memfault_fw_type }}
148+
memfault_fw_type: ${{ inputs.memfault_fw_type }}
149149
memfault_fw_version_prefix: ${{ env.MEMFAULT_FW_VERSION_PREFIX }}
150150
board: nrf9151dk/nrf9151/ns
151151
short_board: nrf9151dk
152152
version: ${{ env.VERSION }}
153153
path: asset-tracker-template/app
154-
154+
155155
- name: Upload artifacts
156156
uses: actions/upload-artifact@v4
157157
with:
@@ -163,18 +163,33 @@ jobs:
163163
echo Run id: ${{ github.run_id }}
164164
echo Version: ${{ env.VERSION }}
165165
166-
- name: Auto PR update NCS reference
166+
- name: Create update PR
167167
if: ${{ inputs.nrfsdk_sha_update }}
168-
working-directory: asset-tracker-template
168+
uses: peter-evans/create-pull-request@v7
169+
id: pr
170+
with:
171+
path: asset-tracker-template
172+
add-paths: west.yml
173+
commit-message: "manifest: auto: Update nrf-sdk SHA"
174+
branch: nrf-manifest-auto-branch
175+
base: main
176+
title: "manifest: auto: Update nrf-sdk SHA"
177+
178+
- name: Check outputs
169179
run: |
170-
git config user.name "github-actions[bot]"
171-
git config user.email "github-actions[bot]@users.noreply.github.com"
172-
git add west.yml
173-
git commit -m "manifest: auto: Update nrf-sdk SHA"
174-
git push origin HEAD:nrf-manifest-auto-branch --force
175-
gh pr create --title "manifest: auto: Update nrf-sdk SHA" \
176-
--body "Created by GitHub Action" \
177-
--base main \
178-
--head nrf-manifest-auto-branch || true
179-
env:
180-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180+
echo PR created: ${{ steps.pr.outputs.pull-request-nr }}
181+
#- name: Create update PR
182+
# if: ${{ inputs.nrfsdk_sha_update }}
183+
# working-directory: asset-tracker-template
184+
# run: |
185+
# git config user.name "github-actions[bot]"
186+
# git config user.email "github-actions[bot]@users.noreply.github.com"
187+
# git add west.yml
188+
# git commit -m "manifest: auto: Update nrf-sdk SHA"
189+
# git push origin HEAD:nrf-manifest-auto-branch --force
190+
# gh pr create --title "manifest: auto: Update nrf-sdk SHA" \
191+
# --body "Created by GitHub Action" \
192+
# --base main \
193+
# --head nrf-manifest-auto-branch || true
194+
# env:
195+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ncsref-update.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ jobs:
2828
needs: [build, test]
2929
runs-on: ubuntu-latest
3030
permissions:
31+
actions: read
32+
contents: write
33+
packages: read
3134
pull-requests: write
3235
steps:
3336
- name: Update PR state
3437
run: |
35-
PR_ID=$(gh pr list --repo ${{ github.repo }} | grep nrf-manifest-auto-branch | awk '{print $1}')
36-
gh pr review $PR_ID --approve --repo ${{ github.repo }}
38+
PR_ID=$(gh pr list --repo ${{ github.repository }} | grep nrf-manifest-auto-branch | awk '{print $1}')
39+
gh pr review $PR_ID --approve --repo ${{ github.repository }}
3740
env:
3841
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)