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

chore: push docker tags from ci #26

Merged
merged 1 commit into from
Sep 22, 2020
Merged

chore: push docker tags from ci #26

merged 1 commit into from
Sep 22, 2020

Conversation

olizilla
Copy link
Contributor

@olizilla olizilla commented Sep 22, 2020

Adds script and ci config to push to docker hub when.

  • the master or main branch changes
  • semver like tags are pushed to the repo

Pushing a semver like tag pushes a docker image with the same tag. The docker latest tag points to the last semver version tag

Pushing changes to main or master gets you a docker tag of the form --
e.g main-2020-f435621. a -latest docker tag is provided as a convenince if you really want the bleeding edge. The branch name is included in the docker tag name to make that clearer.

This is a tweak on what I set up for go-ipfs in ipfs/kubo#6949

This PR is motivated by the fact that dockerhub has repeatedly been a time sink, and it's latest issue is that our docker builds fail there when we try to init the git submodules, which is not a problem locally or on circleci. The suggested docker hub hooks fix in #22 did not solve it, so here we take back control and push the docker image we were building anyway to the hub.

License: MIT
Signed-off-by: Oli Evans [email protected]

Adds script and ci config to push to docker hub when
- the master or main branch changes
- semver like tags are pushed to the repo

Pushing a semver like tag pushes a docker image with the same tag. The docker latest tag points to the last semver version tag

Pushing changes to main or master gets you a docker tag of the form <branch name>-<date>-<truncated commit sha>
e.g main-2020-f435621. a <branch>-latest docker tag is provided as a convenince if you really want the bleeding edge. The branch name is included in the docker tag name to make that clearer.

This is a tweak on what I set up for go-ipfs in ipfs/kubo#6949

License: MIT
Signed-off-by: Oli Evans <[email protected]>
Copy link
Contributor

@placer14 placer14 left a comment

Choose a reason for hiding this comment

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

Looks wonderful. Ty!

@placer14 placer14 merged commit c88b4c5 into master Sep 22, 2020
@placer14 placer14 deleted the push-to-docker-from-ci branch September 22, 2020 17:58
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.

2 participants