This commit is contained in:
xRain 2023-08-22 14:44:49 +08:00
parent 73243a8f57
commit e508959b5f
1 changed files with 4 additions and 6 deletions

View File

@ -23,13 +23,11 @@ runs:
- name: build docker image
uses: docker://docker:git
env:
DOCKER_IMAGE: ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}
with:
entrypoint: "/bin/sh"
args: |
-c 'docker build -t ${{env.DOCKER_IMAGE}} . && \
echo ${{env.DOCKER_IMAGE}}已经构建完了 && \
-c 'docker build -t ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} . && \
echo ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \
docker login ${{env.DOCKER_REGISTRY}} -u ${{env.DOCKER_USER}} -p ${{env.DOCKER_PASS}} && \
docker push ${{env.DOCKER_IMAGE}} && \
echo ${{env.DOCKER_IMAGE}}推送成功'
docker push ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \
echo ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}推送成功'