mirror of
https://github.com/miskcoo/ugreen_dx4600_leds_controller.git
synced 2025-07-23 12:23:09 +02:00
Merge branch 'gh-actions'
This commit is contained in:
34
.github/workflows/build-truenas.yml
vendored
Normal file
34
.github/workflows/build-truenas.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Build kernel module for TrueNAS
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- gh-actions
|
||||||
|
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-run:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: gh-actions
|
||||||
|
|
||||||
|
- name: Build the kernel modules
|
||||||
|
working-directory: build-scripts/truenas
|
||||||
|
run: bash build-all.sh
|
||||||
|
|
||||||
|
- name: Push results to GitHub
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
|
with:
|
||||||
|
commit_message: "Add compiled modules"
|
||||||
|
branch: gh-actions
|
||||||
|
file_pattern: 'build-scripts/truenas/build/*/*/led-ugreen.ko'
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,7 +4,6 @@ ugreen_leds_cli
|
|||||||
run.sh
|
run.sh
|
||||||
zpool_leds.sh
|
zpool_leds.sh
|
||||||
|
|
||||||
*.ko
|
|
||||||
*.mod.c
|
*.mod.c
|
||||||
*.o
|
*.o
|
||||||
*.cmd
|
*.cmd
|
||||||
|
12
build-scripts/truenas/build-all.sh
Normal file
12
build-scripts/truenas/build-all.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
truenas_versions=$(curl https://download.truenas.com/ | grep -Po "(?<=href=\")TrueNAS-SCALE-\w*?/\d+(\.\d+)*" | uniq)
|
||||||
|
|
||||||
|
for version in ${truenas_versions}; do
|
||||||
|
# only build for TrueNAS-SCALE-Dragonfish/24.04.0 and later versions
|
||||||
|
if [ $(echo $version | grep -Po "(?<=/)\d+") -ge 24 ] && [ ! -d "build/$version" ]; then
|
||||||
|
echo Building "$version"
|
||||||
|
bash build.sh "$version"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
find -name *.ko
|
@@ -1,3 +1,4 @@
|
|||||||
|
set -x
|
||||||
|
|
||||||
|
|
||||||
url_prefix="https://download.truenas.com/$1/packages/"
|
url_prefix="https://download.truenas.com/$1/packages/"
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
set -x
|
||||||
|
|
||||||
if [[ ! -d ./build ]]; then
|
if [[ ! -d ./build ]]; then
|
||||||
mkdir build
|
mkdir build
|
||||||
|
Reference in New Issue
Block a user