mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 04:58:19 -04:00
adding github action to update kernelPackages daily
This commit is contained in:
40
.github/workflows/kernel_packages_update.yml
vendored
Normal file
40
.github/workflows/kernel_packages_update.yml
vendored
Normal 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
|
||||
Reference in New Issue
Block a user