mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-05 23:39:16 +00:00
Update shellcheck.yml
This commit is contained in:
parent
53b96a98c0
commit
76fa4c68d1
24
.github/workflows/shellcheck.yml
vendored
24
.github/workflows/shellcheck.yml
vendored
@ -24,12 +24,7 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
**.sh
|
**.sh
|
||||||
|
|
||||||
# This is a manual copy from https://github.com/ludeeus/action-shellcheck/blob/00b27aa7cb85167568cb48a3838b75f4265f2bca/action.yaml#L59
|
- name: Download ShellCheck
|
||||||
# Why? Because the action is not capable of adding ONLY a list of files.
|
|
||||||
# We aim to only check the files that have changed.
|
|
||||||
# This is used as we deal with a codebase that throws a lot of warnings.
|
|
||||||
# Checking only the changed files is a good compromise to improve the codebase over time.
|
|
||||||
- name: Download shellcheck
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
INPUT_VERSION: "v0.10.0"
|
INPUT_VERSION: "v0.10.0"
|
||||||
@ -42,29 +37,24 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
baseurl="https://github.com/koalaman/shellcheck/releases/download"
|
baseurl="https://github.com/koalaman/shellcheck/releases/download"
|
||||||
|
|
||||||
# ShellCheck herunterladen ins Arbeitsverzeichnis
|
|
||||||
curl -Lso "${{ github.workspace }}/sc.tar.xz" \
|
curl -Lso "${{ github.workspace }}/sc.tar.xz" \
|
||||||
"${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz"
|
"${baseurl}/${INPUT_VERSION}/shellcheck-${INPUT_VERSION}.${osvariant}.x86_64.tar.xz"
|
||||||
|
|
||||||
# Entpacken und verschieben
|
|
||||||
tar -xf "${{ github.workspace }}/sc.tar.xz" -C "${{ github.workspace }}"
|
tar -xf "${{ github.workspace }}/sc.tar.xz" -C "${{ github.workspace }}"
|
||||||
mv "${{ github.workspace }}/shellcheck-${INPUT_VERSION}/shellcheck" \
|
mv "${{ github.workspace }}/shellcheck-${INPUT_VERSION}/shellcheck" \
|
||||||
"${{ github.workspace }}/shellcheck"
|
"${{ github.workspace }}/shellcheck"
|
||||||
|
|
||||||
# Debugging: Zeige den Pfad und die Datei
|
- name: Verify ShellCheck binary
|
||||||
echo "ShellCheck binary path:"
|
run: |
|
||||||
ls -l "${{ github.workspace }}/shellcheck"
|
ls -l "${{ github.workspace }}/shellcheck"
|
||||||
|
|
||||||
|
- name: Display ShellCheck version
|
||||||
- name: Display shellcheck version
|
|
||||||
shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
"${{ github.action_path }}/shellcheck" --version
|
"${{ github.workspace }}/shellcheck" --version
|
||||||
|
|
||||||
- name: Run ShellCheck
|
- name: Run ShellCheck
|
||||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
env:
|
env:
|
||||||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
run: |
|
run: |
|
||||||
echo "${ALL_CHANGED_FILES}" | xargs shellcheck
|
echo "${ALL_CHANGED_FILES}" | xargs "${{ github.workspace }}/shellcheck"
|
||||||
|
Loading…
Reference in New Issue
Block a user