mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-06-30 11:07:38 +00:00
Correctly check for changed files in Shellcheck workflow (#1156)
This commit is contained in:
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 != ''
|
||||
|
Reference in New Issue
Block a user