From 2d160c70f94f8d07b8fe3609de780b772316dd42 Mon Sep 17 00:00:00 2001 From: naiba Date: Mon, 4 Jan 2021 21:29:22 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20docker:=20github=20registry=20wi?= =?UTF-8?q?th=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 23 +++++++++++++++++++++++ docs/install-docker.MD | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..f9c52f2 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,23 @@ +name: Docker image + +on: + push: + branches: + - "master" + paths-ignore: + - ".gitignore" + - "*.md" + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + + - name: Log into registry + run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin + + - name: Build and push image + run: | + docker build -t ghcr.io/${{ github.repository_owner }}/next-terminal -f Dockerfile . + docker push ghcr.io/${{ github.repository_owner }}/next-terminal diff --git a/docs/install-docker.MD b/docs/install-docker.MD index 4cf0ee5..e890390 100644 --- a/docs/install-docker.MD +++ b/docs/install-docker.MD @@ -6,7 +6,7 @@ docker run -d \ -p 8088:8088 \ --name next-terminal \ - --restart always dushixiang/next-terminal:latest + --restart always ghcr.io/dushixiang/next-terminal:latest ``` ### 使用`mysql`存储数据 @@ -21,7 +21,7 @@ docker run -d \ -e MYSQL_PASSWORD=mysql \ -e MYSQL_DATABASE=next_terminal \ --name next-terminal \ - --restart always dushixiang/next-terminal:latest + --restart always ghcr.io/dushixiang/next-terminal:latest ``` ### 注意事项 ⚠️