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 }} +