Skip to content

Commit 663c32f

Browse files
Added update-rpi-rgb-led-matrix workflow (#49)
Added the update-rpi-rgb-led-matrix workflow, which will create a new pull request if new changes are detected in the rpi-rgb-led-matrix submoodule. Currently this workflow is run on a weekly cadance. This change does require the GITHUB_TOKEN to have ability to create pull requests.
1 parent 9caeea6 commit 663c32f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Update rpi-rgb-led-matrix
2+
3+
on:
4+
schedule:
5+
# Run weekly
6+
- cron: "0 0 * * 0"
7+
workflow_dispatch:
8+
9+
jobs:
10+
update-rpi-rgb-led-matrix:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout source
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
18+
- name: Update submodule
19+
run: |
20+
git submodule update --remote
21+
22+
- name: Set env
23+
run: |
24+
cd rpi-led-matrix-sys/cpp-library
25+
echo "SUBMODULE_SHA=$(git rev-parse HEAD | cut -c 1-6)" >> $GITHUB_ENV
26+
27+
- name: Create Pull Request
28+
uses: peter-evans/create-pull-request@v5
29+
with:
30+
add-paths: |
31+
rpi-led-matrix-sys/cpp-library
32+
title: rpi-rgb-led-matrix Update to ${{env.SUBMODULE_SHA}}
33+
body: Update rpi-rgb-led-matrix to ${{env.SUBMODULE_SHA}}
34+
commit-message: Update rpi-rgb-led-matrix to ${{env.SUBMODULE_SHA}}
35+
branch: update-rpi-rgb-led-matrix-${{env.SUBMODULE_SHA}}
36+
delete-branch: true
37+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)