36 lines
886 B
YAML
36 lines
886 B
YAML
|
name: Auto-update firmware
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- main
|
||
|
schedule:
|
||
|
# daily, hour and minute chosen arbitrarily
|
||
|
- cron: "32 14 * * *"
|
||
|
|
||
|
jobs:
|
||
|
build:
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
with:
|
||
|
submodules: true
|
||
|
|
||
|
- name: Set up Go
|
||
|
uses: actions/setup-go@v2
|
||
|
with:
|
||
|
go-version: 1.18
|
||
|
|
||
|
- name: Check latest kernel version from https://archive.raspberrypi.org/debian/
|
||
|
id: check
|
||
|
run: echo "::set-output name=version::$(go run ./cmd/check-update/main.go)"
|
||
|
|
||
|
- name: Fetch latest kernel
|
||
|
if: steps.check.outputs.version != ''
|
||
|
run: echo "checkout ${{steps.check.outputs.version}}"
|
||
|
|
||
|
- name: Commit the new kernel
|
||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||
|
with:
|
||
|
commit_message: kernel ${{steps.check.outputs.version}}
|