Skip to content

Commit 702ff8e

Browse files
authored
Update README.md
1 parent e483287 commit 702ff8e

File tree

1 file changed

+13
-31
lines changed

1 file changed

+13
-31
lines changed

README.md

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
11
# Docker Run Action
22

3-
Github Workflows already supports running on public docker images out-of-the-box (See [jobs.<jobs_id>.container](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer)).
3+
- run a privately-owned image.
4+
- run an image built by a previous step.
5+
- run a specific step in docker.
6+
- See https://github.com/addnab/docker-run-action/blob/main/action.yml for all the available inputs.
47

5-
### Then why use docker-run-action?
6-
- run on a privately-owned image.
7-
- run on an image built by a previous step.
8-
- run a specific step in docker
8+
#### Typical Use Case
99

10-
### Example Usage
11-
12-
#### single-line command
13-
```yaml
14-
- uses: addnab/docker-run-action@v1
15-
with:
16-
image: docker:latest
17-
run: echo "hello world"
18-
```
19-
20-
#### multi-line commands
2110
```yaml
2211
- uses: addnab/docker-run-action@v1
2312
with:
24-
image: docker:latest
13+
username: ${{ secrets.DOCKER_USERNAME }}
14+
password: ${{ secrets.DOCKER_PASSWORD }}
15+
registry: gcr.io
16+
image: private-image:latest
17+
options: -v $GITHUB_WORKSPACE:/work -e ABC=123
2518
run: |
26-
echo "first line"
27-
echo "second line"
19+
./run-script
2820
```
2921
30-
#### run on a privately-owned image
22+
#### run a privately-owned image
3123
```yaml
3224
- uses: addnab/docker-run-action@v1
3325
with:
@@ -38,7 +30,7 @@ Github Workflows already supports running on public docker images out-of-the-box
3830
run: echo "hello world"
3931
```
4032
41-
#### run on an image built by a previous step
33+
#### run an image built by a previous step
4234
```yaml
4335
- uses: docker/build-push-action@v1
4436
with:
@@ -62,13 +54,3 @@ Github Workflows already supports running on public docker images out-of-the-box
6254
echo "first line"
6355
echo "second line"
6456
```
65-
66-
#### use docker options
67-
```yaml
68-
- uses: addnab/docker-run-action@v1
69-
with:
70-
image: docker:latest
71-
options: -v $GITHUB_WORKSPACE:/work -e ABC=123
72-
run: |
73-
echo "first line"
74-
```

0 commit comments

Comments
 (0)