update auto_release workflow

This commit is contained in:
Gerrit Gogel 2023-08-26 17:26:38 +02:00
parent 538e1277de
commit 3c185c43f4

View file

@ -36,12 +36,14 @@ jobs:
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=""
fi fi
echo "FOLDER_CHANGED=$FOLDER_CHANGED"
if [ -z "$FOLDER_CHANGED" ]; then if [ -z "$FOLDER_CHANGED" ]; then
echo "Skipping as ${{ matrix.folder }} didn't change." echo "Skipping as ${{ matrix.folder }} didn't change."
exit 0 exit 0
fi fi
echo "FOLDER_CHANGED=$FOLDER_CHANGED"
echo "FOLDER_CHANGED=$FOLDER_CHANGED" >> $GITHUB_ENV
if [[ -f "$FOLDER_CHANGED/Dockerfile" ]]; then if [[ -f "$FOLDER_CHANGED/Dockerfile" ]]; then
SEAFILE_VERSION=$(grep -m 1 'SEAFILE_VERSION' $FOLDER_CHANGED/Dockerfile | awk -F'SEAFILE_VERSION=' '{print $2}' | awk '{print $1}' | tr -d '\n') SEAFILE_VERSION=$(grep -m 1 'SEAFILE_VERSION' $FOLDER_CHANGED/Dockerfile | awk -F'SEAFILE_VERSION=' '{print $2}' | awk '{print $1}' | tr -d '\n')