new github action build-push-action for docker development #331
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does it fix?
Closes #270
I added a build and publish workflow that triggers on pushes to master or develop. These will occur when pushing directly or when merging a pull request. Note that it won't occur if a pr is only created.
It will always push with the 'latest' tag
You will need to setup the following credentials as github secrets (similar to the example given):
ORGANIZATION - dockerhub organization
REPO - dockerhub image repository from the above organization (not sure if a new one needs to be created?)
USERNAME and PASSWORD for a user with access to these
You can find more information about the github action here: https://github.com/docker/build-push-action
How has it been tested?
I used a private github repo for testing the secrets setup along side a private dockerhub repository.
There's an issue I encountered, however. This fails though I'm not sure why yet.. I'm not familiar with dotnet but I believe it may be due to invalid credentials setup?
Results in this during the publish step, when building the image:
Because of (or without the files generated from) the previous error, the following occurs on this step:
Results in this during the publish step, when building the image: