This repository was archived by the owner on May 26, 2025. It is now read-only.
new github action build-push-action for docker development#331
Open
dariuschira wants to merge 2 commits intocode4romania:mainfrom
Open
new github action build-push-action for docker development#331dariuschira wants to merge 2 commits intocode4romania:mainfrom
dariuschira wants to merge 2 commits intocode4romania:mainfrom
Conversation
RaduCStefanescu
suggested changes
Oct 25, 2020
Contributor
RaduCStefanescu
left a comment
There was a problem hiding this comment.
Hey @mirceachira
This one looks nice but what happens when you push to develop or master? The image will be built but based on two distinct code bases.
Can you please tag the image accordingly?
dev for develop branch, prod for master branch.
Thanks!
sandrohanea
approved these changes
Nov 10, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: