-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
feat: Add github action to tag docker image #160
Conversation
.github/workflows/docker-release.yml
Outdated
|
||
on: | ||
push: | ||
branches: [ dev ] |
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.
We could also add main
here if that's useful?
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.
I agree with the idea of adding main (in addition to dev) to trigger the publication of an image.
IMHO,
- any push (merge) to dev should publish a docker image tagged as
dev
(which represents the latest stable enough version for testing, with the same semantic than a debiantesting
distribution.) - any semver tag on the main branch should gnerate a
stable
release, and this image should be published and tagged with the version number (semver). In addition to tagging with the version number, We may also add the taglatest
so that this version is the one retrieved by default when a user wants to run the default Scaphandre, without providing explicitly the version in the docker command.
To get this differentiated behavior may involve 2 separate actions (one triggered on any push to dev branchh, and the other triggered by add a git tag).
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.
@demeringo Thanks I added the main branch too.
For the latest
tag this is set by the docker-metadata action when a new tag is pushed. If it's the latest according to semver.
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} |
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.
These need to be added as secrets in the GitHub repo.
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.
@bpetit, we need someone with admin access to the repo to configure CI vars.
Hi, |
b262058
to
c29bd64
Compare
Hi @demeringo thanks I've merged the latest changes from dev |
I add the credentials to the CI secrets. Thanks a lot for this ! |
Towards #152