2022-03-23 16:32:29 +00:00
|
|
|
name: Auto-update kernel
|
2022-03-23 16:08:12 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
- 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
|
2022-03-23 16:32:29 +00:00
|
|
|
run: echo "::set-output name=sha::$(go run ./cmd/check-update/main.go)"
|
2022-03-23 16:08:12 +00:00
|
|
|
|
|
|
|
- name: Fetch latest kernel
|
2022-03-23 16:32:29 +00:00
|
|
|
if: steps.check.outputs.sha != ''
|
2022-03-23 16:38:13 +00:00
|
|
|
run: |
|
|
|
|
echo "checkout ${{steps.check.outputs.sha}}"
|
|
|
|
cd linux-sources
|
|
|
|
git fetch --depth=1 origin ${{steps.check.outputs.sha}}
|
|
|
|
cd ..
|
|
|
|
git submodule update
|
|
|
|
git diff --no-ext-diff
|
2022-03-23 16:08:12 +00:00
|
|
|
|
2022-03-23 16:38:13 +00:00
|
|
|
# - name: Commit the new kernel
|
|
|
|
# uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
# with:
|
|
|
|
# commit_message: kernel ${{steps.check.outputs.sha}}
|