Skip to content

Commit

Permalink
Update structure-check.yml
Browse files Browse the repository at this point in the history
Signed-off-by: LUG Tiet <[email protected]>
  • Loading branch information
lugti authored Oct 25, 2024
1 parent 1681a3b commit 34f2ab7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/structure-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ jobs:

- name: Validate Structure
run: |
# Ensure there is atleast one previous commit
if [ $(git rev-parse --is-shallow-repository) = true ]; then
git fetch --unshallow
fi
# Get the list of changed files in the push
changed_files=$(git diff --name-only HEAD~1 HEAD)
if git rev-parsem --verify HEAD~1 >/dev/null 2>&1; then
changed_files=$(git diff --name-only HEAD~1 HEAD)
else
changed_files=$(git ls-files)
fi
# Defined allowed Directories
username="${{ github.actor }}"
Expand Down

0 comments on commit 34f2ab7

Please sign in to comment.