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

Separate image building workflow from release workflow with improvements #43

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

kke
Copy link
Contributor

@kke kke commented Sep 26, 2023

Fixes #42

The image publish part was extracted from the release.yaml and moved to
publish-images.yaml.

The new publish-images workflow's functionality was modified:

  • Changed images are published as :latest when PRs containing Dockerfile changes are merged to main
  • All images are published as :v1.2.3 (or whatever the version is) when binaries are released
  • Manual dispatch of republishing all images as :latest or any other tags has been made possible

kke added 2 commits September 26, 2023 15:07
Fixes #42

The image publish part was extracted from the release.yaml and moved to
publish-images.yaml.

The new publish-images workflow's functionality was modified:

- On a tagged release (when binaries are released) the workflow will
  publish version-tagged versions of all machine images eg.
  quay.io/k0sproject/footloose-debian12:v1.2.3
- On a PR merge to main where Dockerfiles were modified, all the changed
  images will be built and published with the tag :latest, eg.
  quay.io/k0sproject/footloose-debian12:latest
- If the workflow is dispatched manually, all images will be built and
  published as :latest (or any tag set in the dispatch input).

The end result of this is that:

- Images are published as :latest as PRs are merged
- Images are published as :v1.2.3 when binaries are released
- All images can be manually published as :latest or any other
  tag when a need arises.

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
@kke kke added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Sep 26, 2023
@kke kke merged commit cf0db80 into main Sep 26, 2023
@kke kke deleted the push-image-latest-on-merge branch September 26, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image and binary publishing should happen separately
1 participant