generated from tj-actions/docker-action
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
36 lines (33 loc) · 886 Bytes
/
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
name: Docker Run
description: Run steps using docker
author: tj-actions
inputs:
image:
description: 'Docker image'
required: true
name:
description: 'Container name'
required: true
args:
description: 'Command to run'
required: false
options:
description: 'Options to pass to docker run'
required: false
default: ''
outputs:
container-id:
description: 'Container ID'
value: ${{ steps.docker-run.outputs.container_id }}
runs:
using: 'composite'
steps:
- name: Docker Run
id: docker-run
shell: bash
run: |
docker run -v "/var/run/docker.sock":"/var/run/docker.sock" --name ${{ inputs.name }} ${{ inputs.options }} ${{ inputs.image }} ${{ inputs.args }}
echo "container_id=$(docker ps -a --filter name=${{ inputs.name }} -q)" >> "$GITHUB_OUTPUT"
branding:
icon: refresh-cw
color: white