11 Commits

Author SHA1 Message Date
github-actions
70e92d6595 GitHub bot: changelog 2025-11-26 06:46:05 +00:00
Alexandre
846057d767 Merge pull request #2238 from alexbelgium/codex/improve-and-consolidate-github-workflows
chore: consolidate lint workflows
2025-11-26 07:40:18 +01:00
Alexandre
f32d00c25c Merge pull request #2239 from alexbelgium/codex/fix-issue-#2237-in-hassio-addons
Expose CAN device mapping for SignalK add-on
2025-11-26 07:39:51 +01:00
Alexandre
b7eaa78f9a Update version in config.yaml from 2.18.0-6 to 2.18.0-3 2025-11-26 07:39:26 +01:00
Alexandre
697c057ce9 Update CHANGELOG with architecture deprecation and CAN capabilities
Updated changelog to reflect deprecation of support for certain architectures and added capabilities for CAN interface configuration.
2025-11-26 07:39:05 +01:00
Alexandre
9dcaeabe2d Add CAN device mapping 2025-11-26 07:37:51 +01:00
Alexandre
b927ecfaa6 Refactor GitHub Actions workflow for better clarity
Refactor GitHub Actions workflow to improve readability and maintainability. Updated conditions for job execution and streamlined steps for detecting changed add-ons, sanitizing files, and building images.
2025-11-26 06:57:00 +01:00
Alexandre
2f40d46568 Downgrade qBittorrent version to 5.1.2-22 2025-11-26 06:55:50 +01:00
Alexandre
a237ee9169 Update qBittorrent version to 5.1.2-23 2025-11-26 06:55:07 +01:00
Alexandre
39af3e9453 Refactor GitHub Actions workflow for clarity and updates
Refactor GitHub Actions workflow for improved readability and functionality. Update paths, permissions, and steps for detecting changes and sanitizing files.
2025-11-26 06:54:36 +01:00
Alexandre
c93b8df483 chore: consolidate lint workflows 2025-11-26 06:49:18 +01:00
6 changed files with 182 additions and 181 deletions

173
.github/workflows/lint.yml vendored Normal file
View File

@@ -0,0 +1,173 @@
name: Lint workflows
on:
push:
branches: [ master ]
paths-ignore:
- "**/config.*"
pull_request:
branches: [ master ]
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
lint-changes:
if: github.event_name == 'push' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set diff range
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "DIFF_RANGE=${{ github.event.pull_request.base.sha }}...${{ github.sha }}" >> $GITHUB_ENV
else
echo "DIFF_RANGE=${{ github.event.before }}...${{ github.sha }}" >> $GITHUB_ENV
fi
- name: Fix non-printable Unicode spaces in changed text files
run: |
set -euo pipefail
CHANGED_FILES=$(git diff --name-only "$DIFF_RANGE")
UNICODE_SPACES_REGEX=$'[\\u00A0\\u2002\\u2003\\u2007\\u2008\\u2009\\u202F\\u205F\\u3000\\u200B]'
for file in $CHANGED_FILES; do
if [ -f "$file" ]; then
MIME_TYPE=$(file --mime-type -b "$file")
if [[ "$MIME_TYPE" == text/* ]]; then
perl -CSD -pe "s/$UNICODE_SPACES_REGEX/ /g" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
fi
fi
done
- name: Run Super Linter
uses: super-linter/super-linter/slim@main
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_CHECKOV: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_JSCPD: false
VALIDATE_NATURAL_LANGUAGE: false
FILTER_REGEX_EXCLUDE: .github/workflows/.*
FIX_ENV: false
FIX_HTML_PRETTIER: false
FIX_SHELL_SHFMT: true
FIX_YAML_PRETTIER: false
FIX_JSON: false
FIX_MARKDOWN: false
FIX_PYTHON_BLACK: false
FIX_PYTHON_ISORT: false
FIX_PYTHON_RUFF: false
- name: Restore executable permissions
run: |
find . -type f \( -name "*.sh" -o -name "run" \) -exec chmod +x {} \;
- name: Sort changed JSON files
run: |
set -euo pipefail
mapfile -t changed < <(git diff --name-only "$DIFF_RANGE" -- '*/*.json')
if [ "${#changed[@]}" -eq 0 ]; then
echo "No changed JSON files to sort."
exit 0
fi
for file in "${changed[@]}"; do
if [ -f "$file" ]; then
tmp="$file.tmp"
jq --sort-keys . "$file" > "$tmp" && mv "$tmp" "$file"
fi
done
- name: Remove Super-Linter output (prevent checkout conflict)
run: sudo rm -rf super-linter-output/
lint-autofix:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fix non-printable Unicode spaces in all text files
run: |
set -euo pipefail
UNICODE_SPACES_REGEX=$'[\\u00A0\\u2002\\u2003\\u2007\\u2008\\u2009\\u202F\\u205F\\u3000\\u200B]'
find . -type f ! -path "./.git/*" | while read -r file; do
MIME_TYPE=$(file --mime-type -b "$file")
if [[ "$MIME_TYPE" == text/* ]]; then
perl -CSD -pe "s/$UNICODE_SPACES_REGEX/ /g" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
fi
done
- name: Run Super Linter
uses: super-linter/super-linter/slim@main
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_CHECKOV: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_JSCPD: false
VALIDATE_NATURAL_LANGUAGE: false
FILTER_REGEX_EXCLUDE: .github/workflows/.*
FIX_ENV: true
FIX_HTML_PRETTIER: true
FIX_SHELL_SHFMT: true
FIX_YAML_PRETTIER: true
FIX_JSON: false
FIX_MARKDOWN: true
FIX_PYTHON_BLACK: true
FIX_PYTHON_ISORT: true
FIX_PYTHON_RUFF: true
- name: Use 4 spaces in shell scripts
run: |
curl -sSLo /usr/local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.12.0/shfmt_v3.12.0_linux_amd64
chmod +x /usr/local/bin/shfmt
find . -type f \( -name "*.sh" -o -name "run" \) -exec shfmt -w -i 4 -ci -bn -sr {} +
- name: Sort json files
run: |
set -euo pipefail
shopt -s nullglob
for file in */*.json; do
tmp="$file.tmp"
jq --sort-keys . "$file" > "$tmp" && mv "$tmp" "$file"
done
- name: Restore executable permissions
run: |
find . -type f \( -name "*.sh" -o -name "run" \) -exec chmod +x {} \;
- name: Remove Super-Linter output (prevent checkout conflict)
run: sudo rm -rf super-linter-output/
- name: Check for linting changes
id: changed
run: |
if ! git diff --quiet; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Create New Pull Request If Needed
if: steps.changed.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
title: "Github bot: fix linting issues nobuild"
commit-message: "fix: auto-fix linting issues"
branch-suffix: timestamp

View File

@@ -1,84 +0,0 @@
name: Lint On Change
on:
push:
branches: [ master ]
paths-ignore:
- "**/config.*"
pull_request:
branches: [ master ]
jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set diff range
id: diff
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "DIFF_RANGE=${{ github.event.pull_request.base.sha }}...${{ github.sha }}" >> $GITHUB_ENV
else
echo "DIFF_RANGE=${{ github.event.before }}...${{ github.sha }}" >> $GITHUB_ENV
fi
- name: Fix non-printable Unicode spaces in changed text files
run: |
echo "Finding changed files in $DIFF_RANGE..."
CHANGED_FILES=$(git diff --name-only $DIFF_RANGE)
UNICODE_SPACES_REGEX=$'[\u00A0\u2002\u2003\u2007\u2008\u2009\u202F\u205F\u3000\u200B]'
for file in $CHANGED_FILES; do
if [ -f "$file" ]; then
MIME_TYPE=$(file --mime-type -b "$file")
if [[ "$MIME_TYPE" == text/* ]]; then
echo "Fixing: $file"
perl -CSD -pe "s/$UNICODE_SPACES_REGEX/ /g" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
else
echo "Skipping non-text file: $file ($MIME_TYPE)"
fi
fi
done
- name: Run Super Linter
uses: super-linter/super-linter/slim@main
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_CHECKOV: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_JSCPD: false
VALIDATE_NATURAL_LANGUAGE: false
FILTER_REGEX_EXCLUDE: .github/workflows/.*
FIX_ENV: false
FIX_HTML_PRETTIER: false
FIX_SHELL_SHFMT: true
FIX_YAML_PRETTIER: false
FIX_JSON: false
#FIX_JSON_PRETTIER: true
FIX_MARKDOWN: false
#FIX_MARKDOWN_PRETTIER: true
FIX_PYTHON_BLACK: false
FIX_PYTHON_ISORT: false
FIX_PYTHON_RUFF: false
- name: Restore executable permissions
run: |
find . -type f \( -name "*.sh" -o -name "run" \) -exec chmod +x {} \;
- name: Sort json files
id: sort
run: |
for files in */*.json; do
echo "Sorting $files"
jq --sort-keys . "$files" > config2.json && cat config2.json > "$files" && rm config2.json
echo "changed=1" >> "$GITHUB_OUTPUT"
done
shell: bash
- name: Remove Super-Linter output (prevent checkout conflict)
run: sudo rm -rf super-linter-output/

View File

@@ -1,95 +0,0 @@
name: Lint Codebase
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
super-lint:
name: Lint and Autofix
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Fix non-printable Unicode spaces in all text files
run: |
echo "Searching for all files in the repository..."
UNICODE_SPACES_REGEX=$'[\u00A0\u2002\u2003\u2007\u2008\u2009\u202F\u205F\u3000\u200B]'
# Find all regular files, excluding .git directory
find . -type f ! -path "./.git/*" | while read -r file; do
MIME_TYPE=$(file --mime-type -b "$file")
if [[ "$MIME_TYPE" == text/* ]]; then
echo "Fixing: $file"
perl -CSD -pe "s/$UNICODE_SPACES_REGEX/ /g" "$file" > "$file.tmp" && mv "$file.tmp" "$file"
else
echo "Skipping non-text file: $file ($MIME_TYPE)"
fi
done
- name: Run Super Linter
uses: super-linter/super-linter/slim@main
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_CHECKOV: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_JSCPD: false
VALIDATE_NATURAL_LANGUAGE: false
FILTER_REGEX_EXCLUDE: .github/workflows/.*
FIX_ENV: true
FIX_HTML_PRETTIER: true
FIX_SHELL_SHFMT: true
FIX_YAML_PRETTIER: true
FIX_JSON: false
#FIX_JSON_PRETTIER: true
FIX_MARKDOWN: true
#FIX_MARKDOWN_PRETTIER: true
FIX_PYTHON_BLACK: true
FIX_PYTHON_ISORT: true
FIX_PYTHON_RUFF: true
- name: Use 4 spaces in shell scripts
run: |
curl -sSLo /usr/local/bin/shfmt https://github.com/mvdan/sh/releases/download/v3.12.0/shfmt_v3.12.0_linux_amd64
chmod +x /usr/local/bin/shfmt
find . -type f \( -name "*.sh" -o -name "run" \) -exec shfmt -w -i 4 -ci -bn -sr {} +
- name: Sort json files
id: sort
run: |
for files in */*.json; do
echo "Sorting $files"
jq --sort-keys . "$files" > config2.json && cat config2.json > "$files" && rm config2.json
echo "changed=1" >> "$GITHUB_OUTPUT"
done
shell: bash
- name: Restore executable permissions
run: |
find . -type f \( -name "*.sh" -o -name "run" \) -exec chmod +x {} \;
- name: Remove Super-Linter output (prevent checkout conflict)
run: sudo rm -rf super-linter-output/
- name: Check for linting changes
id: changed
run: |
if ! git diff --quiet; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Create New Pull Request If Needed
if: steps.changed.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v7
with:
title: "Github bot: fix linting issues nobuild"
commit-message: "fix: auto-fix linting issues"
branch-suffix: timestamp

View File

@@ -1,4 +1,6 @@
## 2.18.0-3 (26-11-2025)
- The Home Assistant project has deprecated support for the armv7, armhf and i386 architectures. Support wil be fully dropped in the upcoming Home Assistant 2025.12 release
- Add NET_ADMIN and NET_RAW capabilities to allow configuring CAN interfaces without host networking
## 2.18.0-2 (18-11-2025)
- Minor bugs fixed

View File

@@ -34,7 +34,9 @@ _Thanks to everyone having starred my repo! To star it click on the image below,
## Configuration
No optional variables
### Options
- `env_vars`: Extra environment variables passed to SignalK.
## Installation

View File

@@ -4,6 +4,7 @@ arch:
- amd64
description: An implementation of a Signal K central server for boats
devices:
- /dev/can
- /dev/can0
- /dev/can1
- /dev/ttyUSB0
@@ -43,6 +44,8 @@ schema:
- name: match(^[A-Za-z0-9_]+$)
value: str?
privileged:
- NET_ADMIN
- NET_RAW
- SYS_ADMIN
- SYS_RAWIO
slug: signalk
@@ -50,5 +53,5 @@ uart: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
usb: true
version: 2.18.0-2
version: 2.18.0-3
webui: http://[HOST]:[PORT:3000]