adding github action to update kernelPackages daily

This commit is contained in:
2024-09-29 11:07:28 -04:00
parent 4bffd7adfb
commit edde8fa713

View File

@@ -0,0 +1,40 @@
name: Daily Pull Request
on:
schedule:
- cron: "0 0 * * *"
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Make changes
run: |
# Update ZFS package to match the latest supported Linux kernel version
raw_latest_zfs=$(curl -s https://raw.githubusercontent.com/openzfs/zfs/master/META | grep Linux-Maximum | cut -d" " -f2)
latest_zfs="${raw_latest_zfs//./_}"
sed -i "s/linuxPackages_6_[0-9]\+/linuxPackages_$latest_zfs/" systems/common/global/default.nix
# Commit the changes
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add systems/common/global/default.nix
git commit -m "Update Linux kernel and ZFS packages"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Daily update
title: Daily update
body: |
This is an automated pull request.
Daily update performed+9 at $(date)
branch: daily-update
delete-branch: true