Merge pull request #2 from docker/opencontainers-labels

Opencontainers labels
This commit is contained in:
Nick Adcock 2020-03-09 10:24:51 +00:00 committed by GitHub
commit df13b26136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View file

@ -33,7 +33,7 @@ Username used to log in to a Docker registry. If not set then no login will occu
### `password` ### `password`
Password used to log in to a Docker registry. If not set then no login will occur. Password or personal access token used to log in to a Docker registry. If not set then no login will occur.
### `registry` ### `registry`
@ -102,7 +102,7 @@ Always attempt to pull a newer version of the image.
### `build_args` ### `build_args`
Comma-delmited list of build-time variables. Comma-delimited list of build-time variables.
Example: Example:
@ -124,14 +124,15 @@ labels: label_name_1=label_value_1,label_name_2=label_value_2
Boolean value. Defaults to `false`. Boolean value. Defaults to `false`.
Adds labels with git repository information to the built image. Adds labels with git repository information to the built image based on the standards set out in https://github.com/opencontainers/image-spec/blob/master/annotations.md.
The labels are: The labels are:
|Label key|Example value|Description| |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.| |`org.opencontainers.image.created`|`2020-03-06T23:00:00Z`|Date and time on which the image was built (string, date-time as defined by RFC 3339).|
|`com.docker.github-actions-sha`|`676cae2f85471aeff6776463c72881ebd902dcf9`|Full git SHA of the current commit.| |`org.opencontainers.image.source`|`https://github.com/myorg/myrepository`|URL to the GitHub repository.|
|`org.opencontainers.image.revision`|`676cae2f85471aeff6776463c72881ebd902dcf9`|The full git SHA of this commit.|
### `push` ### `push`

View file

@ -3,7 +3,7 @@ description: Builds and pushes Docker images and will log in to a Docker registr
author: Docker author: Docker
runs: runs:
using: docker using: docker
image: docker://docker/github-actions:v0.0.1 image: docker://docker/github-actions:v0.1
args: args:
- build-push - build-push
inputs: inputs:
@ -11,7 +11,7 @@ inputs:
description: Username used to log in to a Docker registry. If not set then no login will occur description: Username used to log in to a Docker registry. If not set then no login will occur
required: false required: false
password: password:
description: Password used to log in to a Docker registry. If not set then no login will occur description: Password or personal access token used to log in to a Docker registry. If not set then no login will occur
required: false required: false
registry: registry:
description: Server address of Docker registry. If not set then will default to Docker Hub description: Server address of Docker registry. If not set then will default to Docker Hub
@ -27,7 +27,7 @@ inputs:
required: false required: false
default: false default: false
tag_with_sha: tag_with_sha:
description: Automatically tags the built image with the git short sha as per the readme description: Automatically tags the built image with the git short SHA as per the readme
required: false required: false
default: false default: false
path: path:
@ -45,13 +45,13 @@ inputs:
required: false required: false
default: false default: false
build_args: build_args:
description: Comma-delmited list of build-time variables description: Comma-delimited list of build-time variables
required: false required: false
labels: labels:
description: Comma-delimited list of labels to add to the built image description: Comma-delimited list of labels to add to the built image
required: false required: false
add_git_labels: add_git_labels:
description: Adds labels with git repo info to the built image description: Adds labels with git repository information to the built image
required: false required: false
default: false default: false
push: push: