-
Notifications
You must be signed in to change notification settings - Fork 3
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
ci: publish container with all version tags TDE-527 #299
Conversation
.github/workflows/containers.yml
Outdated
docker push ghcr.io/linz/topo-imagery:${GIT_VERSION} | ||
docker tag topo-imagery ghcr.io/linz/topo-imagery:latest | ||
docker push ghcr.io/linz/topo-imagery:latest | ||
if [ ${{(github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, 'release:'))}} == true ]; then |
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.
Have to use contains
and not startsWith
as when the release-please
PR gets merged, the commit message not only contains the release: ...
commit:
commit 68f58f69bbaec5a5895a1ef3572949ec516ac39a (HEAD -> master, tag: v0.4.0, origin/master, origin/HEAD)
Merge: 94fb2a7 1ca37f3
Author: paulfouquet <86932794+paulfouquet@users.noreply.github.com>
Date: Mon Jan 16 10:54:41 2023 +1300
Merge pull request #29 from paulfouquet/release-please--branches--master
release: 0.4.0
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.
your commit here looks to be a Merge commit, we do not allow merge commits in this repo.
When merging it should be merged as a Squash+Rebase, here is an example commit with a squash/rebase
so startsWith
is what we want.
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.
I haven't do my test in a exact same environment that's why...
@@ -0,0 +1 @@ | |||
CHANGELOG.md |
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.
This is to avoid prettier
to complain about *
VS -
in the changelog generated by release-please
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
|
||
- name: Publish Containers | ||
if: ${{(github.ref == 'refs/heads/master') && !(startsWith(github.event.head_commit.message, 'release:'))}} |
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.
This is to avoid a tag being created at this stage when a release is published.
This has been tested here https://github.com/paulfouquet/topo-imagery-test
The current PR #103 won't trigger the container tag for release as the default title given by
release-please
ischore(master):
. We probably close this PR #103 so release-please will open another one with the right title.