-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add build & release pipeline for versioned images #107
Conversation
This is looking incredible. Thanks. |
Not in its current form, but I will see if I can make this work and update this PR! |
This reverts commit 070162a.
There, it should build for the required platforms now 😄 I also realized that I was previously targeting the wrong image name; it should be correct now |
Thank you very much. And now, to make sure my very tired brain is understanding all this. So, In this scenario,
What should the branch name be like? Appreciate your time and patience. |
You should ideally try to have a linear git history by using squash-merge, but it's simply because it makes the history easier to follow. Here is the workflow I would recommend when doing any work that could span more than a single commit:
To do a squash-merge from an open pull request, simply select the squash and merge strategy in the merge form: When you accumulate enough work items following the guidelines above, simply merge the release PR that will have been automatically created by release-please to push a new release with all of those changes included. If that is still unclear for you, let me show you a concrete example on one of my project. The latest release for that project is V2.2.5, which is a few months old already. Since I have had a few works done since that release (there were only dependencies updates, but the principles stay the same), there have been a few conventional commits following the release tag (which were all created by merging pull requests using squash-merge): |
Okay that was a lot, sorry... Let me just answer your two questions directly:
|
No no. Not too much. Very valuable explanation. |
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.
🙌
Thanks. I added those permissions but it failed again. Where are this coming from?
|
Okay I think it might be due to the fact that the pipeline is running with my privileges (since those changes were made by me, and run from a PR initiated by me), so I am thinking of making a change to the pipeline so it doesn't run release Please on PR not on branches other than main (as it does not really make sense to run it in those contexte anyway). I'll update you after work, when I have access to my personal computer.
These come from the |
Appreciate it 👍 |
… commits on the main branch
Thank you very much again 🥇 |
Hi!
Following my issue (#94), here is the PR for the new workflow for automated release management and versioned images. I have refactored what I initially proposed from my blog (will have to update the post now 😁), but it still offers the same functionalities. Now, there are a few things you should know before you actually merge this PR and use the new workflow:
<branch_name>
is pushed (e.g. commits onmain
branch create imagebellamy/wallos:main
pr-<id>
is created but not pushed (basically only checks that image is buildable) (e.g. pull request Adding input validation before saving to the db #105 creates imagebellamy/wallos:pr-105
)<major>.<minor>.<patch>
,<major>.<minor>
,<major>
andlatest
are pushed (e.g. merge of release PR 1.2.3 creates imagesbellamy/wallos:1.2.3
,bellamy/wallos:1.2
,bellamy/wallos:1
andbellamy/wallos:latest
)Release-As: x.x.x
. This behavior is documented here.env
section of the workflow, mainly the target registry (currently docker.io) and credentials for it (currently depends on secrets that I am guessing were already created for the previous workflow?) and the project type (currently set tosimple
, so new releases only updates the changelog in the repo)I realize this is a lot of information so it might seem scary, but I just want to give you the full guide, even though the actual use should be mostly automated and worry free 🙂 And if you have any question or remarks, please contact me back and I will be happy to help.