Update docker-image.yml

This commit is contained in:
zhenorzz 2024-01-09 16:52:47 +08:00 committed by GitHub
parent c31325cc65
commit ac7ec3caac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ jobs:
steps: steps:
- name: Get version - name: Get version
id: get_version id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build the Docker image - name: Build the Docker image
@ -24,4 +24,4 @@ jobs:
# 使用Dockerfile构建镜像 # 使用Dockerfile构建镜像
docker build -t zhenorzz/goploy . --file docker/Dockerfile docker build -t zhenorzz/goploy . --file docker/Dockerfile
# 推送镜像到镜像仓库 # 推送镜像到镜像仓库
docker push zhenorzz/goploy:${{ env.VERSION }} docker push zhenorzz/goploy:${{ steps.get_version.outputs.VERSION }}