Commit 96400c03 authored by Liang Ding's avatar Liang Ding

🐳 Docker 镜像加入 Git 提交哈希值环境变量 Fix #82

parent 7bbb7a80
......@@ -11,5 +11,5 @@ jobs:
- name: Build the Docker image
run: |
docker login --username=${{ secrets.DOCKER_HUB_USER }} --password=${{ secrets.DOCKER_HUB_PWD }}
docker build -t b3log/solo:latest .
docker build --build-arg git_commit=$(git rev-parse --short HEAD) -t b3log/solo:latest .
docker push b3log/solo
......@@ -13,6 +13,9 @@ COPY --from=MVN_BUILD /opt/solo/ /opt/solo/
RUN apk add --no-cache ca-certificates tzdata
ENV TZ=Asia/Shanghai
ARG git_commit=0
ENV git_commit=$git_commit
EXPOSE 8080
ENTRYPOINT [ "java", "-cp", "lib/*:.", "org.b3log.solo.Server" ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment