From 76da6de41b8c3e27bd34a68d835f9a2b94e3456e Mon Sep 17 00:00:00 2001 From: fifsky Date: Thu, 19 Mar 2020 15:40:31 +0800 Subject: [PATCH] ssh-action change to webhook --- .github/workflows/mail.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/mail.yml b/.github/workflows/mail.yml index 65704fa..03ba3f2 100644 --- a/.github/workflows/mail.yml +++ b/.github/workflows/mail.yml @@ -46,21 +46,9 @@ jobs: docker build . --file Dockerfile --tag registry.cn-shanghai.aliyuncs.com/fifsky/gostruct-web docker push registry.cn-shanghai.aliyuncs.com/fifsky/gostruct-web - - name: Publish to Aliyun - uses: fifsky/ssh-action@master - with: - host: ${{ secrets.HOST }} - user: root - key: ${{ secrets.PRIVATE_KEY}} - command: | - docker login --username=${{secrets.DOCKER_USERNAME}} --password=${{secrets.DOCKER_PASSWORD}} registry-vpc.cn-shanghai.aliyuncs.com - docker stop gostruct gostruct-web - docker rm gostruct gostruct-web - docker rmi registry-vpc.cn-shanghai.aliyuncs.com/fifsky/gostruct:latest registry-vpc.cn-shanghai.aliyuncs.com/fifsky/gostruct-web:latest - docker pull registry-vpc.cn-shanghai.aliyuncs.com/fifsky/gostruct - docker pull registry-vpc.cn-shanghai.aliyuncs.com/fifsky/gostruct-web - docker run -d --name gostruct --restart always --network fifsky --network-alias gostruct registry-vpc.cn-shanghai.aliyuncs.com/fifsky/gostruct - docker run -d --name gostruct-web --restart always --network fifsky --network-alias gostruct-web registry-vpc.cn-shanghai.aliyuncs.com/fifsky/gostruct-web + - name: Pull docker and restart + run: | + curl https://hook.fifsky.com/?token=${{secrets.WEBHOOK_TOKEN}}&script=go-struct - name: Dingtalk message uses: fifsky/dingtalk-action@master