File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
actions/publish_release_images Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 4646 make docker-publish DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
4747 make docker-manifest DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
4848 if [[ "$current_tag" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then
49- make docker-tag-latest DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
50- make docker-publish DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
51- make docker-manifest DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
49+ # Get the latest stable release tag (excluding pre-releases)
50+ latest_tag=$(git tag -l 'v*' | grep -P '^v\d+\.\d+\.\d+$' | sort -V -r | head -n1)
51+ echo "Current tag: $current_tag"
52+ echo "Latest stable tag: $latest_tag"
53+
54+ # Only push "latest" tags if this is the latest stable release
55+ if [[ "${current_tag}" == "${latest_tag}" ]]; then
56+ echo "This is the latest stable release, pushing 'latest' tags"
57+ make docker-tag-latest DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
58+ make docker-publish DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
59+ make docker-manifest DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }}
60+ else
61+ echo "Skipping 'latest' tags - $current_tag is not the latest stable release"
62+ fi
5263 fi
5364 shell: bash
You can’t perform that action at this time.
0 commit comments