Skip to content

feat: 恢复绘制背景以及网格功能 #84

feat: 恢复绘制背景以及网格功能

feat: 恢复绘制背景以及网格功能 #84

name: action
on: [push, pull_request]
jobs:
docker-image-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Docker Image
env:
IMAGE_TAG: ${{ github.sha }}
IMAGE_NAME: my-tights
DOCKER_HUB_USER: ${{ vars.DOCKER_HUB_USER }}
DOCKER_HUB_SECRET: ${{ secrets.DOCKER_HUB_SECRET }}
run: |
docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_SECRET
docker build -t $DOCKER_HUB_USER/$IMAGE_NAME:$IMAGE_TAG .
docker push $DOCKER_HUB_USER/$IMAGE_NAME:$IMAGE_TAG
docker tag $DOCKER_HUB_USER/$IMAGE_NAME:$IMAGE_TAG $DOCKER_HUB_USER/$IMAGE_NAME:latest
docker push $DOCKER_HUB_USER/$IMAGE_NAME:latest
- name: deploy
uses: appleboy/ssh-action@v1.0.2
env:
DOCKER_HUB_USER: ${{ vars.DOCKER_HUB_USER }}
DOCKER_HUB_SECRET: ${{ secrets.DOCKER_HUB_SECRET }}
IMAGE_NAME: my-tights
with:
host: ${{ vars.SERVER_HOST }}
username: ${{ vars.SERVER_USER }}
password: ${{ secrets.SERVER_PWD }}
port: ${{ vars.SERVER_PORT }}
envs: DOCKER_HUB_USER,DOCKER_HUB_SECRET,IMAGE_NAME
script: |
docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_SECRET
docker rm -f $IMAGE_NAME
docker pull $DOCKER_HUB_USER/$IMAGE_NAME:latest
docker run -itd --name=$IMAGE_NAME -p 8000:8000 $DOCKER_HUB_USER/$IMAGE_NAME:latest
docker ps