Skip to content

Commit

Permalink
Fixing nits with README
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Adcock <nick.adcock@docker.com>
  • Loading branch information
Nick Adcock committed Mar 6, 2020
1 parent ec96550 commit 95dd02d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# build-push-action

Builds and pushes docker images and will log in to a docker registry if required
Builds and pushes Docker images and will log in to a Docker registry if required

[Inputs](#Inputs)
* [repository](#repository)
Expand Down Expand Up @@ -29,15 +29,15 @@ Builds and pushes docker images and will log in to a docker registry if required

### `username`

Username used to log in to a docker registry. If not set then no login will occur.
Username used to log in to a Docker registry. If not set then no login will occur.

### `password`

Password used to log in to a docker registry. If not set then no login will occur.
Password used to log in to a Docker registry. If not set then no login will occur.

### `registry`

Server address of docker registry. If not set then will default to Docker Hub.
Server address of Docker registry. If not set then will default to Docker Hub.

### `tags`

Expand Down Expand Up @@ -74,11 +74,11 @@ Examples:

Boolean value. Defaults to `false`.

Automatically tags the built image with the git short sha prefixed with `sha-`.
Automatically tags the built image with the git short SHA prefixed with `sha-`.

Example:

|Git sha|Image tag|
|Git SHA|Image tag|
|---|---|
|`676cae2f85471aeff6776463c72881ebd902dcf9`|`sha-676cae2`|

Expand All @@ -88,11 +88,11 @@ Path to run the docker build from. Defaults to `.`.

### `dockerfile`

Name of the Dockerfile (Default is 'path/Dockerfile'). Defaults to `{path}/Dockerfile`.
Name of the Dockerfile. Defaults to `{path}/Dockerfile`.

### `target`

Sets the target build stage to build.
Sets the target stage to build.

### `always_pull`

Expand Down Expand Up @@ -124,14 +124,14 @@ labels: label_name_1=label_value_1,label_name_2=label_value_2

Boolean value. Defaults to `false`.

Adds labels with git repo info to the built image.
Adds labels with git repository information to the built image.

The labels are:

|Label key|Example value|Description|
|---|---|---|
|`com.docker.github-actions-actor`|`my-username`|The actor that kicked off the workflow. For example this could be the username of the user that did the git push.|
|`com.docker.github-actions-sha`|`676cae2f85471aeff6776463c72881ebd902dcf9`|Full git sha of the current commit.|
|`com.docker.github-actions-sha`|`676cae2f85471aeff6776463c72881ebd902dcf9`|Full git SHA of the current commit.|


### `push`
Expand All @@ -142,7 +142,7 @@ Whether to push the built image.

## Example usage

The following will build the root Dockerfile, tag the image as `myorg/myrepository:latest`, logs in to docker hub using GitHub secrets, and pushes the image to the docker hub repository `myorg/myrepository`:
The following will build the root Dockerfile, tag the image as `myorg/myrepository:latest`, log in to Docker Hub using GitHub secrets, and push the image to the Docker Hub repository `myorg/myrepository`:

```yaml
uses: docker/build-push-action@v1
Expand All @@ -153,7 +153,7 @@ with:
tags: latest
```

The following will build the root Dockerfile, tag the image with the git reference and sha as described above, logs in to docker hub using GitHub secrets, and pushes the image to the docker hub repository `myorg/myrepository`:
The following will build the root Dockerfile, tag the image with the git reference and SHA as described above, log in to Docker Hub using GitHub secrets, and push the image to the Docker Hub repository `myorg/myrepository`:

```yaml
uses: docker/build-push-action@v1
Expand Down

0 comments on commit 95dd02d

Please sign in to comment.