ci: add working dir and some minor changes of create-version.sh (#2133)

* ci: add context argument in build-greptime-binary action

* refactor: add 'working-dir' in upload-artifacts action and rename 'context' to 'working-dir'

* refactor: use timestamp as part of image tag when trigger manually
This commit is contained in:
zyy17
2023-08-10 12:46:43 +08:00
committed by GitHub
parent 0270708d6d
commit 587a24e7fb
5 changed files with 27 additions and 6 deletions

View File

@@ -38,7 +38,7 @@ function create_version() {
echo "COMMIT_SHA is empty in dev build"
exit 1
fi
echo "dev-$(date "+%Y%m%d%S")-$(echo "$COMMIT_SHA" | cut -c1-8)"
echo "dev-$(date "+%Y%m%d-%s")-$(echo "$COMMIT_SHA" | cut -c1-8)"
exit 0
fi
@@ -50,7 +50,7 @@ function create_version() {
fi
echo "$GITHUB_REF_NAME"
elif [ "$GITHUB_EVENT_NAME" = workflow_dispatch ]; then
echo "$NEXT_RELEASE_VERSION-$(git rev-parse --short HEAD)-$(date "+%Y%m%d%S")"
echo "$NEXT_RELEASE_VERSION-$(git rev-parse --short HEAD)-$(date "+%Y%m%d-%s")"
elif [ "$GITHUB_EVENT_NAME" = schedule ]; then
echo "$NEXT_RELEASE_VERSION-$NIGHTLY_RELEASE_PREFIX-$(date "+%Y%m%d")"
else