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

add ability to create stable/dev/edge docker builds using git tags and GH actions + enable docker build cache #61

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

RoguedBear
Copy link
Contributor

as discussed in #51, i have added the option to mark the image being built for a git tag as dev/edge/stable (stable also being latest).

This is how the workflow dispatch menu would look like:
image

And all the tags published are here: https://hub.docker.com/r/roguedbear/wallos-test/tags?page=1&ordering=last_updated
image

For the branch input:

  • if branch is a git tag, then the "Build Type" option would be used (as shown in the tags)
  • if the branch is not a git tag, then the branch name would be used as the tag.
  • latest tag is only published when stable build type is selected

Also, optionally i noticed that image build time was around 15minutes, and image was being built entirely everytime, so I have enabled build cache too. So hopefully once an image is built, on future builds, caches for unchanged layers should not get invalidated resulting in faster build time.

image
https://github.com/RoguedBear/Wallos/actions/workflows/build-images.yml


Please let me know if you have additional feedbacks or want something changed.

closes #51

@RoguedBear RoguedBear changed the title add ability to create stable/dev/edge docker builds using git tags and GH actions + enable build cache add ability to create stable/dev/edge docker builds using git tags and GH actions + enable docker build cache Nov 20, 2023
Copy link
Owner

@ellite ellite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thank you very much!

@ellite ellite merged commit 2dd1710 into ellite:main Nov 21, 2023
@devzwf
Copy link
Contributor

devzwf commented Nov 21, 2023

very nice

@RoguedBear
Copy link
Contributor Author

I am glad!

@ellite
Copy link
Owner

ellite commented Nov 25, 2023

Hi @RoguedBear , I noticed that it does not matter which choice I make, it always pushes with the tag "main". I assume it is using the branch name, since none of the options is "main".
Could have a look if you have some time? I don't have any experience with GitHub actions.
Thank you.

@RoguedBear
Copy link
Contributor Author

RoguedBear commented Nov 26, 2023

Hi @ellite , Yes you are correct that it is using the branch name main by default.
In order to make a versioned release, you have to tag a commit with a version number and push it to github (or you can create a versioned release from github's ui itself). Afterwards you will see the option to select a tag here

image

Having the branch name also as an option to push as a image tag leaves you open to the option of having branch specific images, if in future you decide to have a dev branch or if you want to test out feature branches, etc.

I hope this clarifies. Please let me know if you have further queries
Cheers!

@ellite
Copy link
Owner

ellite commented Nov 26, 2023

Sorry. I am bit lost.
So, to push to DockerHub with the the tag latest I would have to create a branch latest and run the workflow with it selected?

What do slecting edge, dev or stable change?
Thanks.

@RoguedBear
Copy link
Contributor Author

RoguedBear commented Nov 26, 2023

As the discussion was going on in here #51 (comment), the idea was that wallos could make versioned releases. following a version scheme like semver to indicate if the type of change is a bugfix/new feature/breaking changes, since having everything on the latest wouldnt give someone the ability to rollback if need be.

To do that whenever you would create a new github release (and hence a new version tag), you can select that tag through the run options, and edge, dev or stable could indicate to someone the stability of the new version, stable indicating you can upgrade to the new version without the fear of wallos breaking.

As for the latest tag, whenever you would publish a stable release from a git tag (not a branch!), that stable release would automatically be tagged as latest (in order to keep latest on stable releases only to prevent someone from inadvertently upgrading to dev or edge builds)

The comments in that issue reiterate what i am saying in more descriptive ways.

I hope this clarifies. feel free to ask again if something is unclear.

Also if you want to experiment around with creating tags and using the workflow, i can add you as a collaborator to my fork (which hopefully should allow you to run github actions on my repo and create new tags)
edit: invited you as a collaborator, feel free to use that repo as your playground. pushed docker images will appear here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE REQUEST] Split docker release in latest and dev tag, use github release feature
3 participants