mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-07-31 16:19:10 +00:00
Merge 3b7de4fd74
into 3b48e6e903
This commit is contained in:
commit
3906d8ce85
1 changed files with 13 additions and 1 deletions
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
|
@ -103,7 +103,19 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Check which main tag we are going to build determined by ref_type
|
# Check which main tag we are going to build determined by ref_type
|
||||||
if [[ "${REF_TYPE}" == "tag" ]]; then
|
if [[ "${REF_TYPE}" == "tag" ]]; then
|
||||||
echo "BASE_TAGS=latest,${GITHUB_REF#refs/*/}" | tee -a "${GITHUB_ENV}"
|
VERSION_TAGS=${GITHUB_REF#refs/*/}
|
||||||
|
# Add `Major` and `Major.Minor` version tags if GH Ref matches SemVer
|
||||||
|
SEMVER_REGEX="^([0-9]+)\.([0-9]+)\.([0-9]+)([-+].*)?$"
|
||||||
|
if [[ "${VERSION_TAGS}" =~ $SEMVER_REGEX ]]; then
|
||||||
|
VERSION_TAGS+=",${BASH_REMATCH[1]}"
|
||||||
|
VERSION_TAGS+=",${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
|
||||||
|
# Add `Major.Minor.Patch` version tag if GH Ref contains SemVer extension
|
||||||
|
if [[ "${BASH_REMATCH[4]}" ]]; then
|
||||||
|
VERSION_TAGS+=",${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "BASE_TAGS=latest,${VERSION_TAGS}" | tee -a "${GITHUB_ENV}"
|
||||||
elif [[ "${REF_TYPE}" == "branch" ]]; then
|
elif [[ "${REF_TYPE}" == "branch" ]]; then
|
||||||
echo "BASE_TAGS=testing" | tee -a "${GITHUB_ENV}"
|
echo "BASE_TAGS=testing" | tee -a "${GITHUB_ENV}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue