-
Notifications
You must be signed in to change notification settings - Fork 33
DESKTOP-2412 Github action 1: Write first code to run the action #2
Conversation
Adding functionality to read the common github actions variables and the docker login variables. Also adding the ability to run a `docker login` from the command Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Adding build options along with generation of default tags and labels based on git settings Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Removing the GITHUB_RUN_ID and GITHUB_RUN_NUMBER as they do not allow linking to the actual actions run easily Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Adding build command to the binary. The command works by calling out to the docker cli binary Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Add ability to override both the path to the dockerfile and the path to run the docker build from Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Adds initial e2e framework including: * Makefile test-e2e command * Running in docker * Login test with automated local registry setup and teardown Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Creates the registry image to be used for e2e tests from a local Dockerfile.registry so the path to the auth/htpasswd doesn't need to be figured out at runtime Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Adds push command and tests Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
|
|
||
| #### inputs | ||
|
|
||
| See the tagging section for information on tag inputs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eventually we should make these links
See the [tagging section](https://github.com/docker/github-actions/README.md#Tagging)
or however that works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. Will get round to it once the inputs and tags have been finalized
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
|
I've reviewed the readme and some of the dockerfile but I'd like someone else to review the golang. |
I’ve been into the pinata CI today but I was planning on doing that as soon as possible. |
mat007
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of nits, a few questions.
Thanks!
| for _, tc := range testCases { | ||
| tc := tc | ||
| t.Run(tc.name, func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I personally find it’s easier to read and less convoluted to just use a function to factor the test code and call it multiple times, one for each test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how I've seen and been doing it within app-def/dev-tooling repos so I've been following that standard.
Split auto-tagging to enable tagging with sha and tagging with ref separately. The action definition will handle the default settings. Also rename SetDefaultLabels to AddGitLabels Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Returns an error when boolean inputs are invalid: - tag_with_ref - tag_with_sha - push If the inputs are not set then defaults to false Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Adds the code to run the initial build-push github actions including:
There are separate commands for login, build, and push as well as a single build-push command that does all 3 as required. This last command will be the one used by the
docker/build-push-action