mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-01-25 10:06:18 +00:00
Correctly check for changed files in Shellcheck workflow (#1156)
This commit is contained in:
parent
7c0f85d0b3
commit
b8671b97af
6
.github/workflows/shellcheck.yml
vendored
6
.github/workflows/shellcheck.yml
vendored
@ -20,7 +20,11 @@ jobs:
|
||||
- name: Get changed files
|
||||
id: changes
|
||||
run: |
|
||||
echo "::set-output name=files::$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.sh$')"
|
||||
if ${{ github.event_name == 'pull_request' }}; then
|
||||
echo "files=$(git diff --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Run ShellCheck
|
||||
if: steps.changes.outputs.files != ''
|
||||
|
Loading…
Reference in New Issue
Block a user