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

feat: Add github action to tag docker image #160

Merged
merged 3 commits into from
Jun 15, 2022

Conversation

rossf7
Copy link
Contributor

@rossf7 rossf7 commented Mar 6, 2022

Towards #152


on:
push:
branches: [ dev ]
Copy link
Contributor Author

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?

Copy link
Contributor

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 debian testing 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 tag latest 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).

Copy link
Contributor Author

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.

https://github.com/docker/metadata-action#latest-tag

uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Copy link
Contributor Author

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.

Copy link
Contributor

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.

@demeringo
Copy link
Contributor

@rossf7 @bpetit, it seems that the dev branch does not pass the clippy style check.

It implies a small refactoring of code outside the scope of this PR.
Is it OK for you if I open a separate issue / PR related to this style fix, and we merge back to this branch after ?

@demeringo
Copy link
Contributor

Hi,
I opened #161 to track and fix this.

@demeringo
Copy link
Contributor

@rossf7 this is the PR for making Clippy happy: #162

@demeringo
Copy link
Contributor

Hi @rossf7

@bpetit merged #162 to dev branch.
If you merge it to your PR, it should fix the Clippy test.

@rossf7
Copy link
Contributor Author

rossf7 commented Mar 23, 2022

Hi @demeringo thanks I've merged the latest changes from dev

@bpetit
Copy link
Contributor

bpetit commented Jun 15, 2022

I add the credentials to the CI secrets. Thanks a lot for this !

@bpetit bpetit merged commit 25889fb into hubblo-org:dev Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Previous releases
Development

Successfully merging this pull request may close these issues.

3 participants