Skip to content

Check for and tag new release on upstream kernel bump #547

Check for and tag new release on upstream kernel bump

Check for and tag new release on upstream kernel bump #547

name: Check for and tag new release on upstream kernel bump
on:
workflow_dispatch:
schedule:
- cron: '0 12 * * *'
jobs:
check:
name: Check for updated upstream kernel bump
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ssh-key: "${{ secrets.COMMIT_KEY }}"
- name: Reset hard in case of cache
run: |
git fetch -a
git reset --hard origin/main
- name: Get latest Packages.gz
run: |
wget https://archive.raspberrypi.org/debian/dists/bookworm/main/binary-arm64/Packages.gz
- name: Check for update
run: |
zgrep "Filename:.*raspberrypi-kernel_" Packages.gz | sed -e 's/.*raspberrypi-kernel/raspberrypi-kernel/g' > latest_kernel
rm Packages.gz
- name: Commit update if diff
run: |
if output=$(git status --porcelain) && [[ -n "${output}" ]]; then
git config user.name github-actions
git config user.email [email protected]
git add latest_kernel
git commit -m "auto-bumping kernel"
git push
git tag v$(cat latest_kernel | cut -d _ -f 2 | tr -d ' ~^:?*[\\')
git push --tags
fi