mirror of
https://github.com/labring/sealos.git
synced 2026-09-21 05:44:43 +08:00
16 lines
308 B
Bash
16 lines
308 B
Bash
#!/bin/bash
|
|
set -ex
|
|
SHA_TAG=${GIT_COMMIT_SHORT_SHA}
|
|
tag_name="$SHA_TAG"
|
|
|
|
push_image=${1:-false}
|
|
release=${2:-false}
|
|
|
|
if [[ "$push_image" == true ]]; then
|
|
tag_name=${3}
|
|
elif [[ "$release" == true ]]; then
|
|
tag_name=${GITHUB_REF#refs/tags/}
|
|
fi
|
|
|
|
echo "tag_name=$tag_name" >> "$GITHUB_OUTPUT"
|
|
echo "$tag_name" |