-
Notifications
You must be signed in to change notification settings - Fork 510
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
added git actions workflow file #1678
added git actions workflow file #1678
Conversation
@shimwell This would be great. By all means, please push forward and let me know what you need from me to support. Seems like we should have |
I was just hoping that the additional trigger (on PR with develop) would trigger the github actions so I could see this working before it is merged into develop. But it appears that PR from fork doesn't trigger git actions as a security feature. So I removed that additional trigger. I would be nice to see this running before hand but I think the only way we can do that is to PR from a repo branch (not a fork) or merge to develop and hope the triggers work. Also I'm not able to check the secrets have been added for a DOCKERHUB_USERNAME and a I have added a dockerhub build for merges to the master branch called openmc:latest |
@shimwell this is great! Thanks for adding this. It would be nice to combine some of these common steps in the workflow, but sadly it doesn't look like GH is supporting the use of templates for workflows yet. Another solution might be to write our own local GitHub action for this, but I think for the sake of simplicity it would be best to leave that investigation for later. |
One other note is that it would be great to add automated pushing on creation of new version tags. It looks like our last version pushed to dockerhub was |
I think this version tagging is possible, I have just not done it before. Give me a few days to look into it as I think I need to make a new example / test repo. I shall get back to you on that. |
Here is the minimal example repository that I've made to show that a release can trigger a github action and subsequent dockerhub image upload As you can see from the dockerhub there are three images for this repo, one develop, one latest and one with the release version number |
This new .yml should trigger on releases and assumes a tag of v*.. I have added @pshriwise and @paulromano to an example repository just in case you want to test making a pretend release, push to develop, push to main all of which trigger the Github actions. |
@shimwell I've added |
Thanks @paulromano that should be all that is needed, the first image should build when this is merged to develop |
Just a thought but I'm wondering if the recently updated dockerfile could be automatically build and published on dockerhub each time a push to develop branch is made.
There is a Github action for automating such a task https://github.com/docker/build-push-action
This PR would need to be accompanied with some new repository secrets that grant access to the dockerhub account
DOCKERHUB_USERNAME
DOCKERHUB_TOKEN
If people are happy with this then I can also add a openmc:latest image on pushes to master branch