-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
66 lines (65 loc) · 2.04 KB
/
action.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# action.yml
name: "Lite XL Build Box Action"
description: "Runs a command inside Lite XL Build Box."
inputs:
image:
description: "Image name."
required: false
volumes:
description: "A list of volumes to mount."
required: false
options:
description: 'Extra options passed to "docker run".'
required: false
run:
description: 'A list of commands to run inside the container (mutually exclusive with "run-args").'
required: false
run_args:
description: 'A list of arguments passed to "docker run" after the image name (mutually exclusive with "run").'
required: false
shell:
description: "Use a specific shell or entrypoint."
required: false
default: bash
platform:
description: "The platform to run the container on."
required: false
registry:
description: "Container Registry."
required: false
username:
description: "Username."
required: false
password:
description: "Password."
required: false
docker_network:
description: "Docker Network ID."
default: ${{ job.container.network }}
required: false
runs:
using: "composite"
steps:
- name: Login into registry
if: inputs.username != '' && inputs.password != '' && inputs.registry != ''
uses: docker/login-action@v3
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- name: Run Docker
shell: bash
env:
INPUT_IMAGE: ${{ inputs.image }}
INPUT_VOLUMES: ${{ inputs.volumes }}
INPUT_OPTIONS: ${{ inputs.options }}
INPUT_RUN: ${{ inputs.run }}
INPUT_RUN_ARGS: ${{ inputs.run_args }}
INPUT_SHELL: ${{ inputs.shell }}
INPUT_REGISTRY: ${{ inputs.registry }}
INPUT_USERNAME: ${{ inputs.username }}
INPUT_PASSWORD: ${{ inputs.password }}
INPUT_DOCKER_NETWORK: ${{ inputs.docker_network }}
INPUT_PLATFORM: ${{ inputs.platform }}
INPUT_ACTIONS_ENV: ${{ toJson(env) }}
run: "$GITHUB_ACTION_PATH/entrypoint.sh"