From 59d1a48a341efe0418461526b43cd67541ddeb81 Mon Sep 17 00:00:00 2001 From: Kevin Yang <5478483+k-yang@users.noreply.github.com> Date: Mon, 20 Nov 2023 20:39:55 -0500 Subject: [PATCH] ci: build latest docker image on master push --- .github/workflows/goreleaser.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index aa6277004..9bcae44d3 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -4,6 +4,8 @@ on: push: tags: - "*" + branches: + - master permissions: contents: write @@ -40,11 +42,22 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push versioned image + - name: Build and push tagged image uses: docker/build-push-action@v5 + if: startsWith(github.ref, 'refs/tags/v') with: file: contrib/docker/goreleaser.Dockerfile context: . push: true platforms: linux/amd64,linux/arm64 tags: ghcr.io/nibiruchain/nibiru:${{ steps.get_version.outputs.version-without-v }} + + - name: Build and push latest image + uses: docker/build-push-action@v5 + if: startsWith(github.ref, 'refs/heads/master') + with: + file: contrib/docker/goreleaser.Dockerfile + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ghcr.io/nibiruchain/nibiru:latest \ No newline at end of file