From f988953ed7a0c837bc73a1b949350af9ad171a36 Mon Sep 17 00:00:00 2001 From: "wenyang.chu" Date: Tue, 22 Jun 2021 03:24:38 -0400 Subject: [PATCH] add ci yml --- github/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 github/workflows/ci.yml diff --git a/github/workflows/ci.yml b/github/workflows/ci.yml new file mode 100644 index 0000000000..8eb72a0616 --- /dev/null +++ b/github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +# Controls when the action will run. +on: pull_request + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + docker: + runs-on: ubuntu-20.04 + steps: + + - name: Check Out Repo + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + context: ./ + file: ./Dockerfile + push: false + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/sphinxsys:production + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} +