Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
gminn committed Mar 6, 2024
1 parent 7d657a9 commit 86ab8e8
Showing 1 changed file with 42 additions and 12 deletions.
54 changes: 42 additions & 12 deletions .github/workflows/update-from-memfault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ run-name: ${{ inputs.run_name }}

env:
DEFAULT_PYTHON: 3.8
SDK_VER: # empty
on:
push:
branches:
- gminn/pull-latest-memfault-sdk
schedule:
- cron: "8 0 * * *"
workflow_dispatch:
Expand All @@ -17,23 +21,49 @@ jobs:
build:
runs-on: ubuntu-latest

# Image generated from: https://github.com/memfault/memfault-port-playground/tree/master/docker/nrf-connect-sdk
container:
image: memfault/nrf-connect-sdk:2024-01-05
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install needed packages
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y -qq \
curl \
ripgrep
- name: Get latest Memfault MCU SDK version
run: |
SDK_VER=$(rg 'VERSION:\s(\d+\.\d+\.\d+)' \
<(curl -sSL 'https://raw.githubusercontent.com/memfault/memfault-firmware-sdk/master/VERSION') -r '$1' --no-filename --no-line-number)
echo "SDK_VER=$(rg 'VERSION:\s(\d+\.\d+\.\d+)' \
<(curl -sSL 'https://raw.githubusercontent.com/memfault/memfault-firmware-sdk/master/VERSION') -r '$1' --no-filename --no-line-number)" >> $GITHUB_ENV
- name: Echo SDK Version
- name: Get Memfault MCU SDK version in west.yml
run: |
echo $SDK_VER
echo "REPO_SDK_VER=$(yq '.manifest.projects[1].revision' west.yml)" >> $GITHUB_ENV
- name: Update west.yml
if: ${{ env.SDK_VER }} != ${{ env.REPO_SDK_VER }}
run: |
yq -i '.manifest.projects[1].revision = "${{ env.SDK_VER }}"' west.yml
git status
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GH_PAT }}
commit-message: |
chore(memfault): pull in latest memfault sdk
### Summary
Update the Memfault SDK
### Test Plan
CI
title: |
chore(memfault): pull in latest memfault sdk
base: main
branch: github-actions/update-to-memfault-v${{ env.SDK_VER }}
delete-branch: true
team-reviewers: memfault/owners-mcu
draft: true

0 comments on commit 86ab8e8

Please sign in to comment.