容器化部署

This commit is contained in:
naiba
2020-11-06 20:51:23 +08:00
parent fc1e15bf31
commit b46216fe5d
6 changed files with 377 additions and 37 deletions

18
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: Build Docker Image
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: docker
env:
DockerPassword: ${{ secrets.PACKAGE_TOKEN }}
run: |
docker build --no-cache -t docker.pkg.github.com/p14yground/nezha/agent -f Dockerfile.agent .
docker build --no-cache -t docker.pkg.github.com/p14yground/nezha/dashboard -f Dockerfile.dashboard .
docker login -u naiba -p $DockerPassword docker.pkg.github.com
docker push docker.pkg.github.com/p14yground/nezha/agent
docker push docker.pkg.github.com/p14yground/nezha/dashboard