-
Notifications
You must be signed in to change notification settings - Fork 653
feat(ci): support workflow for docker image building #21626
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
Conversation
1e14fd4
to
e462af7
Compare
ff7aff5
to
fb373ba
Compare
echo "LABEL=$LABEL" >> $GITHUB_ENV | ||
|
||
# Build the image tag | ||
IMAGE_TAG="v$VERSION--$LABEL--$COMMIT_SHA--$NO_SLASH_BRANCH_NAME" |
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.
Is it expected to have 2 dash here?
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.
Yes, because branch name can also include dash. I want to clearly delimit each segment. So the tag name is machine readable, and further validation can be done.
Any further comments? |
✅ Cherry-pick PRs (or issues if encountered conflicts) have been created successfully to all target branches. |
Co-authored-by: Noel Kwan <[email protected]>
Co-authored-by: Noel Kwan <[email protected]>
Co-authored-by: Noel Kwan <[email protected]>
Co-authored-by: Noel Kwan <[email protected]>
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.
Maybe we should also only allow images build from the action here and disallow manual building? (unless with some flag)
Co-authored-by: Noel Kwan <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Closes #21601.
This PR reduces margin for human error due to manual tagging of images. It also makes tagging entirely optional. We can automatically generate semantically correct tagging after this PR:
We use
--
, to clearly delimit different sections. Since hyphens-
can be used within each segment as well. It will only be a problem if developer uses-
as a prefix or suffix. I think that's unlikely.Test workflow dispatch via cli (actual use will just be via github UI for workflows, see screenshot below):
example run
After this PR is merged, we can have a similar UX to this (we won't actual fill in a version, just an arbitrary tag, ignore that part):
This gives us a "form-filling experience", as requested by @BugenZhao. It's inspired by the work by @arkbriar for image building in our other repositories.
Subsequently, I will add docs for how to use this workflow in our internal and developer docs.
Checklist
Documentation
Release note