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

Docker Hub container upload automation using GitHub Actions #111

Merged
merged 6 commits into from
Jan 2, 2021
Merged

Docker Hub container upload automation using GitHub Actions #111

merged 6 commits into from
Jan 2, 2021

Conversation

BitFis
Copy link
Contributor

@BitFis BitFis commented Dec 31, 2020

Hey guys,

thought this might be a sleek solution for #109, what do you think?
I felt like trying github actions so i did this test.

To set this up, you need to create two secrets:

  • DOCKERHUB_TOKEN
  • DOCKERHUB_USERNAME

and copy my https://github.com/BitFis/grocy-docker/blob/master/.github/workflows/build-docker.yml file.

The build image tag can be configured with GROCY_IMAGE_TAG docker-compose build, the default
value for simplicity is latest. On push of any tag starting with v, a latest version and aswell as tag version is created.

Hope I was able to help you, if you prefer hooks, just close this issue.

cheers

Copy link
Contributor

@jayaddison jayaddison left a comment

Choose a reason for hiding this comment

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

Thanks for this @BitFis! I've left some small comments and hope to merge this soon. It'd make container release management much easier.

.github/workflows/build-docker.yml Show resolved Hide resolved
.github/workflows/build-docker.yml Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
@BitFis
Copy link
Contributor Author

BitFis commented Jan 1, 2021

Alright, you need to check if it works. I think It might be great if the docker is on every commit built but not pushed, using something like: https://stackoverflow.com/questions/58139406/only-run-job-on-specific-branch-with-github-actions#58142412 but i guess lets just merge this first.

@BitFis
Copy link
Contributor Author

BitFis commented Jan 1, 2021

ps. happy new year 🍾 😄

@jayaddison
Copy link
Contributor

Happy new year, @BitFis! 🎉

This looks ready to try out; we'll need to configure Docker Hub secrets for this repository, so I'll work with @berrnd on that, and then will merge this. Thanks again for providing this workflow.

@jayaddison jayaddison changed the title Example automation using github actions Docker Hub container upload automation using GitHub Actions Jan 2, 2021
@jayaddison jayaddison merged commit f09a99a into grocy:master Jan 2, 2021
@jayaddison
Copy link
Contributor

Success! grocy v3.0.0-2 container images have been automatically built and pushed to Docker Hub using this workflow. Cheers @BitFis!

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

Successfully merging this pull request may close these issues.

None yet

2 participants