Update .forgejo/workflows/CD.yml
This commit is contained in:
parent
8e7f5f17d2
commit
028ee574a5
1 changed files with 5 additions and 1 deletions
|
@ -14,7 +14,11 @@ jobs:
|
||||||
- name: Detect modified folders
|
- name: Detect modified folders
|
||||||
id: detect-changes
|
id: detect-changes
|
||||||
run: |
|
run: |
|
||||||
|
if git rev-parse --verify HEAD^ >/dev/null 2>&1; then
|
||||||
folders=$(git diff-tree --no-commit-id --name-only -r HEAD^..HEAD | cut -d/ -f1 | sort | uniq)
|
folders=$(git diff-tree --no-commit-id --name-only -r HEAD^..HEAD | cut -d/ -f1 | sort | uniq)
|
||||||
|
else
|
||||||
|
folders=$(git diff-tree --no-commit-id --name-only -r origin/main..HEAD | cut -d/ -f1 | sort | uniq)
|
||||||
|
fi
|
||||||
echo "Modified folders: $folders"
|
echo "Modified folders: $folders"
|
||||||
echo "::set-output name=folders::$folders"
|
echo "::set-output name=folders::$folders"
|
||||||
|
|
||||||
|
|
Reference in a new issue