Skip to content
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

Merged
merged 11 commits into from
Jan 19, 2023

Conversation

paulfouquet
Copy link
Collaborator

@paulfouquet paulfouquet commented Jan 12, 2023

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 is chore(master):. We probably close this PR #103 so release-please will open another one with the right title.

@paulfouquet paulfouquet requested a review from a team as a code owner January 12, 2023 20:28
@paulfouquet paulfouquet changed the title ci: publish container with all version tags ci: publish container with all version tags TDE-527 Jan 12, 2023
@paulfouquet paulfouquet marked this pull request as draft January 12, 2023 23:08
@paulfouquet paulfouquet marked this pull request as ready for review January 15, 2023 23:34
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
Copy link
Collaborator Author

@paulfouquet paulfouquet Jan 16, 2023

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

Copy link
Member

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

linz/style-js@169ad32

so startsWith is what we want.

Copy link
Collaborator Author

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...

@paulfouquet paulfouquet marked this pull request as draft January 16, 2023 02:33
@@ -0,0 +1 @@
CHANGELOG.md
Copy link
Collaborator Author

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:'))}}
Copy link
Collaborator Author

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.

@paulfouquet paulfouquet marked this pull request as ready for review January 17, 2023 23:29
@kodiakhq kodiakhq bot merged commit d37cb8e into master Jan 19, 2023
@kodiakhq kodiakhq bot deleted the ci/publish-container-all-tags branch January 19, 2023 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants