更新 .gitea/workflows/main.yaml
Docker Deploy / build-and-deploy (push) Failing after 11s
Details
Docker Deploy / build-and-deploy (push) Failing after 11s
Details
This commit is contained in:
parent
ce454a5464
commit
3e0f603457
|
@ -15,7 +15,7 @@ jobs:
|
|||
# REPO: "${{ vars.ALI_REPO }}"
|
||||
CTN_NAME: "ctn-pms-demo"
|
||||
IMG_NAME: "${{ github.repository }}:${{ github.ref_name }}"
|
||||
REMOTE_IMG_NAME: "${{ vars.ALI_REGISTRY }}/${{ vars.ALI_REPO }}/${{ github.repository }}:${{ github.ref_name }}"
|
||||
REMOTE_IMG_NAME: "${{ vars.ALI_REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}"
|
||||
steps:
|
||||
- name: install nodejs&golang and set proxy
|
||||
run: |
|
||||
|
@ -46,20 +46,20 @@ jobs:
|
|||
run: |
|
||||
docker stop $CTN_NAME || true
|
||||
docker rm $CTN_NAME || true
|
||||
docker rmi $IMG_NAME || true
|
||||
# docker build -t $IMG_NAME . --file Dockerfile
|
||||
docker rmi $REMOTE_IMG_NAME || true
|
||||
# docker build -t $REMOTE_IMG_NAME . --file Dockerfile
|
||||
|
||||
- name: Build and Push Docker Image To Alibaba Cloud
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
context: . Dockerfile
|
||||
tags: $IMG_NAME
|
||||
tags: $REMOTE_IMG_NAME
|
||||
username: ${{ vars.ALI_USER }}
|
||||
password: ${{ vars.ALI_PWD }}
|
||||
- name: Run On Server
|
||||
run: |
|
||||
docker run -d --name $CTN_NAME -p $HOST_PORT:8080 $IMG_NAME
|
||||
docker run -d --name $CTN_NAME -p $HOST_PORT:8080 $REMOTE_IMG_NAME
|
||||
# - name: SSH Deploy
|
||||
# uses: easingthemes/ssh-deploy-action@v2.1.5
|
||||
# env:
|
||||
|
|
Loading…
Reference in New Issue