mirror of
https://github.com/ggogel/seafile-containerized.git
synced 2024-11-16 17:05:32 +00:00
update auto_release workflow
This commit is contained in:
parent
9f94873edf
commit
43f61c501c
18
.github/workflows/auto_release.yml
vendored
18
.github/workflows/auto_release.yml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
folder: ['seafile-server', 'seahub', 'seahub-media']
|
folder: ['seafile-server', 'seahub', 'seahub-media', 'seafile-caddy']
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
|
@ -50,8 +50,13 @@ jobs:
|
||||||
echo "FOLDER_CHANGED=$FOLDER_CHANGED" >> $GITHUB_ENV
|
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')
|
if [[ "$FOLDER_CHANGED" == "seafile-caddy" ]]; then
|
||||||
echo "SEAFILE_VERSION=$SEAFILE_VERSION" >> $GITHUB_ENV
|
CADDY_VERSION=$(grep -m 1 'FROM caddy:' $FOLDER_CHANGED/Dockerfile | awk -F':' '{print $2}' | awk -F'-' '{print $1}' | tr -d '\n')
|
||||||
|
echo "SEAFILE_VERSION=$CADDY_VERSION" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
SEAFILE_VERSION=$(grep -m 1 'SEAFILE_VERSION' $FOLDER_CHANGED/Dockerfile | awk -F'SEAFILE_VERSION=' '{print $2}' | awk '{print $1}' | tr -d '\n')
|
||||||
|
echo "SEAFILE_VERSION=$SEAFILE_VERSION" >> $GITHUB_ENV
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Get Previous Tag and Build Number
|
- name: Get Previous Tag and Build Number
|
||||||
|
@ -91,7 +96,12 @@ jobs:
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
MESSAGES="Seafile version: $SEAFILE_VERSION"$'\n'"Image build version: $NEXT_BUILD"$'\n'"Changelog:"$'\n'"$MESSAGES"
|
if [[ "$FOLDER_CHANGED" == "seafile-caddy" ]]; then
|
||||||
|
MESSAGES="Caddy version: $SEAFILE_VERSION"$'\n'"Image build version: $NEXT_BUILD"$'\n'"Changelog:"$'\n'"$MESSAGES"
|
||||||
|
else
|
||||||
|
MESSAGES="Seafile version: $SEAFILE_VERSION"$'\n'"Image build version: $NEXT_BUILD"$'\n'"Changelog:"$'\n'"$MESSAGES"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "FORMATTED_MESSAGES=${MESSAGES//$'\n'/'%0A'}" >> $GITHUB_ENV
|
echo "FORMATTED_MESSAGES=${MESSAGES//$'\n'/'%0A'}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
|
|
Loading…
Reference in a new issue