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`
@ -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
@ -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`: