update auto_release workflow

This commit is contained in:
Gerrit Gogel 2023-08-26 17:40:52 +02:00
parent 2b04124c61
commit 9f94873edf

View file

@ -31,7 +31,12 @@ jobs:
id: dir_version id: dir_version
run: | run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
FOLDER_CHANGED=${{ github.event.inputs.folder }} if [ "${{ github.event.inputs.folder }}" == "${{ matrix.folder }}" ]; then
FOLDER_CHANGED=${{ github.event.inputs.folder }}
else
echo "Manually triggered for folder ${ { github.event.inputs.folder } }, but current job is for folder ${ { matrix.folder } }. Skipping."
exit 0
fi
else else
CHANGED_FOLDERS=$(git diff --name-only HEAD^ HEAD | cut -d '/' -f1 | uniq) CHANGED_FOLDERS=$(git diff --name-only HEAD^ HEAD | cut -d '/' -f1 | uniq)
[[ "$CHANGED_FOLDERS" =~ "${{ matrix.folder }}" ]] && FOLDER_CHANGED="${{ matrix.folder }}" || FOLDER_CHANGED="" [[ "$CHANGED_FOLDERS" =~ "${{ matrix.folder }}" ]] && FOLDER_CHANGED="${{ matrix.folder }}" || FOLDER_CHANGED=""