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 GH Action for pushing to Docker Hub on Release #482

Merged
merged 2 commits into from
May 7, 2020
Merged

Add GH Action for pushing to Docker Hub on Release #482

merged 2 commits into from
May 7, 2020

Conversation

SanketDG
Copy link
Contributor

@SanketDG SanketDG commented Apr 5, 2020

Added the Github Action for automating pushing the pypa/bandersnatch
image to Docker Hub when a new release in published.

Closes #88

@codecov
Copy link

codecov bot commented Apr 5, 2020

Codecov Report

Merging #482 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #482   +/-   ##
=======================================
  Coverage   81.59%   81.59%           
=======================================
  Files          10       10           
  Lines        1157     1157           
  Branches      168      168           
=======================================
  Hits          944      944           
  Misses        171      171           
  Partials       42       42           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1ff255...6e4845b. Read the comment docs.

Copy link
Contributor

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

We already build on every commit to master. I feel we just need something to tag the build as the release.

1 way could be:

  • See if commit has a Git tag and, if so, mirror it to docker hub tags?

@SanketDG
Copy link
Contributor Author

SanketDG commented Apr 5, 2020

@cooperlees
Copy link
Contributor

Yup - Seems all we need is tag_names: true in .github/workflows/docker_upload.yml. Thanks for finding that!

@cooperlees
Copy link
Contributor

There might be a race before the commit gets the release tag ...

  • I wonder if it's re-ran when a tag is applied?

@SanketDG
Copy link
Contributor Author

SanketDG commented Apr 6, 2020

I wonder if it's re-ran when a tag is applied?

Interesting, let me test this out.

@SanketDG
Copy link
Contributor Author

This is blocked for the meantime, my local Docker instance seems to be causing issues.

Added the Github Action for automating pushing the `pypa/bandersnatch`
image to Docker Hub when a new release is published.

New release here means An Annoteted Tag Push to the master branch

Closes #88
@SanketDG
Copy link
Contributor Author

SanketDG commented May 6, 2020

Pulled this from the graves! Apologies, I get what I deserve for distrohopping so frequently!
I have updated the changes to use tag_names for releases.

There might be a race before the commit gets the release tag ...

  • I wonder if it's re-ran when a tag is applied?

So I tested this, and it seems like it only tags the image when an annotated tag (which is a tag + commit) is pushed, so it only creates an image with the tag name.

Copy link
Contributor

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

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

I say lets merge and see what happens :)

@cooperlees cooperlees merged commit d775ac3 into pypa:master May 7, 2020
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.

Automate Bandersnatch Docker Image Building
2 participants