Skip to content

Commit

Permalink
Merge pull request #52 from stack-wuh/feat-ci
Browse files Browse the repository at this point in the history
fix: (ci) 测试自动重启容器脚本错误
  • Loading branch information
stack-wuh committed Dec 12, 2021
2 parents 722d330 + feb8108 commit 326d109
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
name: Build Container
runs-on: ubuntu-latest
needs: [push_to_docker]
env:
TAG_REF: ${{ github.ref }}
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
Expand All @@ -58,7 +60,8 @@ jobs:
port: ${{ secrets.PORT }}
script: |
docker ps -a
echo "[github bot] version:" ${{ needs.push_to_docker.outputs.tags }}
tag=`echo ${TAG_REF}|awk -F/ '{print $3}'`
echo "[github bot] version:" ${tag}
cd /home/next-web-app/frontend
./bin/clear-docker.sh
./bin/build-container.sh ${{ needs.push_to_docker.outputs.tags }}
./bin/build-container.sh ${tag}
2 changes: 1 addition & 1 deletion bin/build-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ echo '全部参数:' $@
echo '============== docker build contianer ==========='
echo '构建container的版本号: ' $VERSION

# docker ps -a | grep 'frontend.' | awk '{print $1}' | xargs docker stop
docker ps -a | grep 'frontend.' | awk '{print $1}' | xargs docker stop
docker ps -a | grep 'frontend.' | awk '{print $1}' | xargs docker rm
docker pull shadowu/wuh.site:latest
docker container run --name frontend.$VERSION -i -p 3100:3000 --restart=always shadowu/wuh.site:latest
Expand Down

2 comments on commit 326d109

@vercel
Copy link

@vercel vercel bot commented on 326d109 Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment failed with the following error:

The most recent charge for your active payment method has failed. Please update it here: https://vercel.com/teams/163m/settings/billing.

@vercel
Copy link

@vercel vercel bot commented on 326d109 Dec 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.