From 5cadc912462ed8b4c30691d0143bf4b4dc9e768f Mon Sep 17 00:00:00 2001 From: Alejandro Do Nascimento Mora Date: Mon, 22 Apr 2024 14:49:40 +0200 Subject: [PATCH] Push to docker hub --- .github/workflows/ci.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8f7482..b3e10a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ -name: Go - on: push: - branches: [master, main] + branches: [main] pull_request: branches: ["**"] @@ -34,3 +32,29 @@ jobs: - name: Test run: go test -v ./... + + build-and-push: + needs: build + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Dockerhub + uses: docker/login-action@v3 + with: + username: ${{ secrets.ORG_DOCKER_HUB_USERNAME }} + password: ${{ secrets.ORG_DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: timescale/timescaledb-parallel-copy:latest