diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index 66cb5bce97..249a3d87fd 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -266,3 +266,5 @@ jobs: - run: | make helm-push HELM_CHART_VERSION=v0.0.0-latest make helm-push HELM_CHART_VERSION=0.0.0-latest + make helm-push HELM_CHART_VERSION=v0.0.0-${{ github.sha }} TAG=${{ github.sha }} + make helm-push HELM_CHART_VERSION=0.0.0-${{ github.sha }} TAG=${{ github.sha }} diff --git a/.github/workflows/docker_build_job.yaml b/.github/workflows/docker_build_job.yaml index 49dd504910..d7c4b6f086 100644 --- a/.github/workflows/docker_build_job.yaml +++ b/.github/workflows/docker_build_job.yaml @@ -47,13 +47,19 @@ jobs: password: ${{ secrets.DOCKERHUB_PASSWORD }} # Push images for the push events, e.g. when a new tag is pushed as well as PR merges. - # * Only use the tag if the event is a tag event, otherwise use "latest". + # * Only use the tag if the event is a tag event, otherwise use the hash. # * Build for both amd64 and arm64 platforms. - name: Build and Push Image run: | if [[ "$GITHUB_REF" == refs/tags/* ]]; then TAG="${GITHUB_REF#refs/tags/}" else - TAG="latest" + TAG="${{ github.sha }}" fi make docker-build.${{ matrix.command_name }} CMD_PATH_PREFIX=${{ matrix.cmd_path_prefix }} ENABLE_MULTI_PLATFORMS=true TAG=$TAG DOCKER_BUILD_ARGS="--push" + + - name: Build and Push Image Latest + run: | + if [[ "$GITHUB_REF" != refs/tags/* ]]; then + make docker-push.${{ matrix.command_name }} CMD_PATH_PREFIX=${{ matrix.cmd_path_prefix }} ENABLE_MULTI_PLATFORMS=true TAG="latest" DOCKER_BUILD_ARGS="--push" + fi