-
Notifications
You must be signed in to change notification settings - Fork 9
Fix latest container tag publishing #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,16 +38,24 @@ runs: | |
| shell: bash | ||
| - run: | | ||
| current_tag=${GITHUB_REF#refs/*/} | ||
| latest_tag=$(git tag --sort=v:refname | tail -n 1) | ||
| reg_repo=${{ inputs.registry }}/${{ inputs.organization }} | ||
| touch /tmp/tmp-profile | ||
| . /tmp/tmp-profile | ||
| make docker DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} | ||
| make docker DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO="${reg_repo}" | ||
| docker images | ||
| echo ${{ inputs.password }} | docker login -u ${{ inputs.login }} --password-stdin ${{ inputs.registry }} | ||
| make docker-publish DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} | ||
| make docker-manifest DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} | ||
| if [[ "$current_tag" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then | ||
| make docker-tag-latest DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} | ||
| make docker-publish DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} | ||
| make docker-manifest DOCKER_IMAGE_TAG="latest" DOCKER_REPO=${{ inputs.registry }}/${{ inputs.organization }} | ||
| make docker-publish DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO="${reg_repo}" | ||
| make docker-manifest DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO="${reg_repo}" | ||
| if [[ "${current_tag}" == "${latest_tag}" ]]; then | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. trying this out: so if we ship I'll try to sell it again, how about using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, let me look at |
||
| if [[ "${current_tag}" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then | ||
| make docker-tag-latest DOCKER_IMAGE_TAG="$current_tag" DOCKER_REPO="${reg_repo}" | ||
| make docker-publish DOCKER_IMAGE_TAG="latest" DOCKER_REPO="${reg_repo}" | ||
| make docker-manifest DOCKER_IMAGE_TAG="latest" DOCKER_REPO="${reg_repo}" | ||
| else | ||
| echo "INFO: ${current_tag} is probably a pre-release, skipping latest tag" | ||
| fi | ||
| else | ||
| echo "INFO: ${current_tag} is not ${latest_tag}, skipping latest tag" | ||
| fi | ||
| shell: bash | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe we could log this and
current_tagfor better visibility.