mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-28 19:34:05 +02:00
Update onpush_superlinter.yml
This commit is contained in:
22
.github/workflows/onpush_superlinter.yml
vendored
22
.github/workflows/onpush_superlinter.yml
vendored
@@ -15,14 +15,20 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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
|
- name: Fix non-printable Unicode spaces in changed text files
|
||||||
run: |
|
run: |
|
||||||
echo "Finding changed files..."
|
echo "Finding changed files in $DIFF_RANGE..."
|
||||||
CHANGED_FILES=$(git diff --name-only origin/master...HEAD)
|
CHANGED_FILES=$(git diff --name-only $DIFF_RANGE)
|
||||||
|
|
||||||
# Unicode blanks regex (covers all mentioned codepoints)
|
|
||||||
UNICODE_SPACES_REGEX=$'[\u00A0\u2002\u2003\u2007\u2008\u2009\u202F\u205F\u3000\u200B]'
|
UNICODE_SPACES_REGEX=$'[\u00A0\u2002\u2003\u2007\u2008\u2009\u202F\u205F\u3000\u200B]'
|
||||||
|
|
||||||
for file in $CHANGED_FILES; do
|
for file in $CHANGED_FILES; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
MIME_TYPE=$(file --mime-type -b "$file")
|
MIME_TYPE=$(file --mime-type -b "$file")
|
||||||
@@ -51,9 +57,9 @@ jobs:
|
|||||||
FIX_SHELL_SHFMT: true
|
FIX_SHELL_SHFMT: true
|
||||||
FIX_YAML_PRETTIER: true
|
FIX_YAML_PRETTIER: true
|
||||||
FIX_JSON: true
|
FIX_JSON: true
|
||||||
#FIX_JSON_PRETTIER: true
|
FIX_JSON_PRETTIER: true
|
||||||
FIX_MARKDOWN: true
|
FIX_MARKDOWN: true
|
||||||
#FIX_MARKDOWN_PRETTIER: true
|
FIX_MARKDOWN_PRETTIER: true
|
||||||
FIX_PYTHON_BLACK: true
|
FIX_PYTHON_BLACK: true
|
||||||
FIX_PYTHON_ISORT: true
|
FIX_PYTHON_ISORT: true
|
||||||
FIX_PYTHON_RUFF: true
|
FIX_PYTHON_RUFF: true
|
||||||
@@ -65,7 +71,7 @@ jobs:
|
|||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
commit: -u
|
commit: -u
|
||||||
message: "GitHub bot: fix linting issues"
|
message: "GitHub bot: fix linting issues (nobuild)"
|
||||||
default_author: github_actions
|
default_author: github_actions
|
||||||
pull: --rebase --autostash
|
pull: --rebase --autostash
|
||||||
fetch: --tags --force
|
fetch: --tags --force
|
||||||
|
|||||||
Reference in New Issue
Block a user