2020-03-06 17:15:16 +08:00
|
|
|
name: Build and push Docker images
|
|
|
|
description: Builds and pushes Docker images and will log in to a Docker registry if required
|
2020-03-05 23:52:30 +08:00
|
|
|
author: Docker
|
|
|
|
runs:
|
|
|
|
using: docker
|
2020-03-06 21:51:14 +08:00
|
|
|
image: docker://docker/github-actions:v0.1
|
2020-03-05 23:52:30 +08:00
|
|
|
args:
|
|
|
|
- build-push
|
|
|
|
inputs:
|
|
|
|
username:
|
2020-03-06 17:15:16 +08:00
|
|
|
description: Username used to log in to a Docker registry. If not set then no login will occur
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
password:
|
2020-03-06 23:01:36 +08:00
|
|
|
description: Password or personal access token used to log in to a Docker registry. If not set then no login will occur
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
registry:
|
2020-03-06 17:15:16 +08:00
|
|
|
description: Server address of Docker registry. If not set then will default to Docker Hub
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
repository:
|
|
|
|
description: Docker repository to tag the image with
|
|
|
|
required: true
|
|
|
|
tags:
|
2020-03-06 00:28:11 +08:00
|
|
|
description: Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
tag_with_ref:
|
|
|
|
description: Automatically tags the built image with the git reference as per the readme
|
|
|
|
required: false
|
|
|
|
default: false
|
|
|
|
tag_with_sha:
|
2020-03-06 23:01:36 +08:00
|
|
|
description: Automatically tags the built image with the git short SHA as per the readme
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
default: false
|
|
|
|
path:
|
|
|
|
description: Path to run docker build from
|
|
|
|
required: false
|
|
|
|
default: "."
|
|
|
|
dockerfile:
|
|
|
|
description: Name of the Dockerfile (Default is 'path/Dockerfile')
|
|
|
|
required: false
|
|
|
|
target:
|
2020-03-06 17:15:16 +08:00
|
|
|
description: Sets the target stage to build
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
always_pull:
|
|
|
|
description: Always attempt to pull a newer version of the image
|
|
|
|
required: false
|
|
|
|
default: false
|
|
|
|
build_args:
|
2020-03-06 21:55:12 +08:00
|
|
|
description: Comma-delimited list of build-time variables
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
labels:
|
2020-03-06 00:28:11 +08:00
|
|
|
description: Comma-delimited list of labels to add to the built image
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
add_git_labels:
|
2020-03-06 21:51:14 +08:00
|
|
|
description: Adds labels with git repository information to the built image
|
2020-03-05 23:52:30 +08:00
|
|
|
required: false
|
|
|
|
default: false
|
|
|
|
push:
|
|
|
|
description: Whether to push the image
|
|
|
|
required: false
|
|
|
|
default: true
|