Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ FROM docker.m.daocloud.io/nginx:${NGINX_IMAGE_VERSION}
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk -U upgrade

RUN ls dist

COPY dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
COPY startup.sh /usr/share
Expand Down
10 changes: 6 additions & 4 deletions scripts/get-version.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

# if [ -n "$GITHUB_REF" ]; then
# echo "$GITHUB_REF"
# else
if [[ $GITHUB_REF == refs/tags/* ]]; then
# Extract tag name from GITHUB_REF
tag_name=${GITHUB_REF#refs/tags/}
echo "$tag_name"
else
if [ -n "$GITHUB_SHA" ]; then
short_sha=${GITHUB_SHA::7}
else
Expand All @@ -12,4 +14,4 @@
pkg_version=$(cat package.json | grep version | head -1 | awk '{ print $2 }' | sed 's/[",]//g')

echo "v${pkg_version}-dev-${short_sha}"
# fi
fi