Skip to content

Commit

Permalink
ssh-action change to webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
fifsky committed Mar 19, 2020
1 parent e60b702 commit 76da6de
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/mail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76da6de

Please sign in to comment.