-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction-docker.yaml
39 lines (35 loc) · 2.81 KB
/
action-docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# this is an example metadata file for a GitHub Docker Action
# Docker Actions only run on Linux runners
# the file must be named 'action.yaml' or 'action.yml'
# source: https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
# source: https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
name: 'Hello World' # name of your Docker Action. required
author: 'Nathan Nellans' # author of your Docker Action. optional
description: 'Greet someone' # description of your Docker Action. required
branding: # branding is shown next to your action name in GitHub Marketplace. optional
color: 'green' # options are: white, yellow, blue, green, orange, red, purple, gray-dark
icon: 'globe' # pick an option from https://feathericons.com, however some options are omitted, read the docs
inputs: # specifies input parameters that your Docker Action expects to receive when being called
who-to-greet: # id of this input parameter. required. must start with a letter or underscore. can only contain letters, numbers, dashes, or underscores. recommend using lowercase input ids
description: 'Who to greet' # description of this input parameter. required
required: true # specifies if your Docker Action requires a value for this input parameter. optional
default: 'World' # default value to use if a value is not supplied when called. optional
deprecationMessage: 'Some Warning Message' # use this to warn users that the input is deprecated. optional
runs:
using: 'docker' # must be set to docker
image: 'Dockerfile' # option 1: build & then use this Dockerfile. must be named Dockerfile. path is relative to the action.yaml file
image: 'docker://debian:stretch-slim' # option 2: use a public image from Docker Hub
env: # environment variables to set inside the container. optional
KEY: value
KEY: value
pre-entrypoint: 'script.sh' # run a script before the entrypoint. optional
pre-if: # condition to determine if the pre-entrypoint will run or not. ${{ ... }} can optionally be used to enclose your condition. optional
entrypoint: 'script.sh' # use when the Dockerfile does not specify an ENTRYPOINT, or if you want to override the Dockerfile's ENTRYPOINT. optional
args: # these are passed as arguments to the entrypoint. use when you want to override the Dockerfile's CMD. optional
- 'foo'
- 'bar'
post-entrypoint: 'script.sh' # run a script after the entrypoint. optional
post-if: # condition to determine if the post-entrypoint will run or not. ${{ ... }} can optionally be used to enclose your condition. optional
outputs:
random-number: # id of this output parameter. required. must start with a letter or underscore. can only contain letters, numbers, dashes, or underscores
description: 'Random number' # description of this output parameter. required