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 Images: Don't push floating tags from feature branches #28044
Conversation
i guess it does what we want, but it doesn't feel very elegant. requesting review from @nbusseneau to see if he has any suggestions 🚀 🙏 ✨ |
/test |
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.
Yeah I don't know... Technically we should split these steps into separate jobs and then have the if
at the job level, instead of copy-pasting around on all steps. But at the same time these workflows are a mess and doing such a refactor is not trivial...
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.
Wrong button. Too used to just approving your PRs.
Floating tags like "latest" or "v1.14" should only be pushed from main or stable branches. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
57806f9
to
9fab583
Compare
/test |
Define a variable for CI image floating tags instead of hardcoding it. - For the main branch, the floating tag is "latest". - For stable branches, the floating tag is the same as the branch name (e.g. "v1.14"). This commit was initially introduced in cilium#28008, but it got reverted because it tried to push floating tags for feature branches and failed. Now that cilium#28044 is merged, this workflow no longer pushes floating tags from feature branches. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Define a variable for CI image floating tags instead of hardcoding it. - For the main branch, the floating tag is "latest". - For stable branches, the floating tag is the same as the branch name (e.g. "v1.14"). This commit was initially introduced in cilium#28008, but it got reverted because it tried to push floating tags for feature branches and failed. Now that cilium#28044 is merged, this workflow no longer pushes floating tags from feature branches. Therefore it is safe to use github.ref_name as a floating tag. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Define a variable for CI image floating tags instead of hardcoding it. - For the main branch, the floating tag is "latest". - For stable branches, the floating tag is the same as the branch name (e.g. "v1.14"). This commit was initially introduced in #28008, but it got reverted because it tried to push floating tags for feature branches and failed. Now that #28044 is merged, this workflow no longer pushes floating tags from feature branches. Therefore it is safe to use github.ref_name as a floating tag. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ upstream commit 5b55b65 ] Define a variable for CI image floating tags instead of hardcoding it. - For the main branch, the floating tag is "latest". - For stable branches, the floating tag is the same as the branch name (e.g. "v1.14"). This commit was initially introduced in cilium#28008, but it got reverted because it tried to push floating tags for feature branches and failed. Now that cilium#28044 is merged, this workflow no longer pushes floating tags from feature branches. Therefore it is safe to use github.ref_name as a floating tag. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
[ upstream commit 5b55b65 ] Define a variable for CI image floating tags instead of hardcoding it. - For the main branch, the floating tag is "latest". - For stable branches, the floating tag is the same as the branch name (e.g. "v1.14"). This commit was initially introduced in #28008, but it got reverted because it tried to push floating tags for feature branches and failed. Now that #28044 is merged, this workflow no longer pushes floating tags from feature branches. Therefore it is safe to use github.ref_name as a floating tag. Signed-off-by: Michi Mutsuzaki <michi@isovalent.com>
Floating tags like "latest" or "v1.14" should only be pushed from main and stable branches.