diff --git a/.github/workflows/artifacts.yml b/.github/workflows/artifacts.yml index 0708958..06341db 100644 --- a/.github/workflows/artifacts.yml +++ b/.github/workflows/artifacts.yml @@ -30,8 +30,7 @@ jobs: uses: goreleaser/goreleaser-action@v2 with: install-only: true - # Newer goreleaser version doesn't allow builds with "latest" tag - version: v0.179.0 + version: latest - name: Run GoReleaser run: make release-snapshot - name: Install Helm diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc8fc72..68adc3e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,12 +29,12 @@ Now you can build and run BotKube by one of the following ways ### Build the container image -1. This will build BotKube and create a new container image tagged as `infracloudio/botkube:latest` +1. This will build BotKube and create a new container image tagged as `ghcr.io/infracloudio/botkube:v9.99.9-dev` ```sh $ make build $ make container-image - $ docker tag infracloudio/botkube:latest-amd64 /botkube:latest - $ docker push /botkube:latest + $ docker tag ghcr.io/infracloudio/botkube:v9.99.9-dev-amd64 /botkube:v9.99.9-dev + $ docker push /botkube:v9.99.9-dev ``` Where `` is Docker hub account to which you can push the image @@ -53,7 +53,7 @@ Now you can build and run BotKube by one of the following ways --set settings.clustername= \ --set settings.kubectl.enabled= \ --set image.repository=/botkube \ - --set image.tag=latest \ + --set image.tag=v9.99.9-dev \ infracloudio/botkube ``` diff --git a/Makefile b/Makefile index 66c4282..6efb090 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ gorelease: @echo "Publishing release with goreleaser" @./hack/goreleaser.sh release -# Build project and push dev images with latest tag +# Build project and push dev images with v9.99.9-dev tag release-snapshot: @./hack/goreleaser.sh release_snapshot diff --git a/hack/goreleaser.sh b/hack/goreleaser.sh index 19ae60a..82fac87 100755 --- a/hack/goreleaser.sh +++ b/hack/goreleaser.sh @@ -29,18 +29,18 @@ prepare() { release_snapshot() { prepare - export GORELEASER_CURRENT_TAG=latest + export GORELEASER_CURRENT_TAG=v9.99.9-dev goreleaser release --rm-dist --snapshot --skip-publish # Push images - docker push ghcr.io/infracloudio/botkube:latest-amd64 - docker push ghcr.io/infracloudio/botkube:latest-arm64 - docker push ghcr.io/infracloudio/botkube:latest-armv7 + docker push ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG}-amd64 + docker push ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG}-arm64 + docker push ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG}-armv7 # Create manifest - docker manifest create ghcr.io/infracloudio/botkube:latest \ - --amend ghcr.io/infracloudio/botkube:latest-amd64 \ - --amend ghcr.io/infracloudio/botkube:latest-arm64 \ - --amend ghcr.io/infracloudio/botkube:latest-armv7 - docker manifest push ghcr.io/infracloudio/botkube:latest + docker manifest create ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG} \ + --amend ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG}-amd64 \ + --amend ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG}-arm64 \ + --amend ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG}-armv7 + docker manifest push ghcr.io/infracloudio/botkube:${GORELEASER_CURRENT_TAG} } build() { @@ -49,7 +49,7 @@ build() { -v $PWD:/go/src/github.com/infracloudio/botkube \ -v /var/run/docker.sock:/var/run/docker.sock \ -w /go/src/github.com/infracloudio/botkube \ - -e GORELEASER_CURRENT_TAG=latest \ + -e GORELEASER_CURRENT_TAG=v9.99.9-dev \ goreleaser/goreleaser release --rm-dist --snapshot --skip-publish } @@ -69,7 +69,7 @@ usage() { Usage: ${0} [build|release|release_snapshot] Where, build: Builds project with goreleaser without pushing images. - release_snapshot: Builds project without publishing release. It builds and pushes BotKube image with latest image tag. + release_snapshot: Builds project without publishing release. It builds and pushes BotKube image with v9.99.9-dev image tag. release: Makes and published release to GitHub EOM exit 1