From dc2ef7a62dd4485fec53237bc4b9806dba1b2976 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Mon, 15 Nov 2021 16:32:24 +0100 Subject: [PATCH] chore: add docker job --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc0e4b2..b61e171 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,3 +34,30 @@ jobs: args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }} + docker: + runs-on: ubuntu-latest + 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: true + tags: ${{ secrets.DOCKER_HUB_USERNAME }}/contentfulproxy:latest + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }}