Merge pull request 'ci: release automation from Conventional Commits' (#126) from feat/release into main
This commit was merged in pull request #126.
This commit is contained in:
commit
b05f3dbdb0
8 files changed
+644
-5
No files matched your search
@@ -165,12 +165,21 @@ jobs:
|
||||
*) TAG="$(date -u +%Y%m%d%H%M%S)-$SHORT" ;;
|
||||
esac
|
||||
PUSH="--no-push"
|
||||
DEST="--destination ${IMAGE}:${TAG}"
|
||||
DEST="--destination ${IMAGE}:${TAG#v}"
|
||||
# Channels: edge follows main, beta the newest prerelease, latest
|
||||
# and stable the newest release, X.Y its newest patch.
|
||||
case "$GITHUB_REF" in
|
||||
refs/heads/main) CHANNELS="edge" ;;
|
||||
refs/tags/v*-beta.*) CHANNELS="beta" ;;
|
||||
refs/tags/v*)
|
||||
MINOR="$(printf '%s' "${TAG#v}" | cut -d. -f1-2)"
|
||||
CHANNELS="latest stable $MINOR" ;;
|
||||
esac
|
||||
case "$GITHUB_REF" in
|
||||
refs/heads/main|refs/tags/v*)
|
||||
if [ -n "${PACKAGE_TOKEN:-}" ]; then
|
||||
PUSH=""
|
||||
[ "$GITHUB_REF" = refs/heads/main ] && DEST="$DEST --destination ${IMAGE}:latest"
|
||||
for c in $CHANNELS; do DEST="$DEST --destination ${IMAGE}:$c"; done
|
||||
else
|
||||
echo "PACKAGE_TOKEN is not set; building without pushing."
|
||||
fi ;;
|
||||
|
||||
Reference in new issue
Block a user