From 702ff8ec1704c38e6eb63a7dc92b957b075c6616 Mon Sep 17 00:00:00 2001 From: Abdud Dayan Adeeb Date: Mon, 15 Feb 2021 01:12:38 -0500 Subject: [PATCH] Update README.md --- README.md | 44 +++++++++++++------------------------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 19b16df..55c42c6 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,25 @@ # Docker Run Action -Github Workflows already supports running on public docker images out-of-the-box (See [jobs..container](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idcontainer)). +- run a privately-owned image. +- run an image built by a previous step. +- run a specific step in docker. +- See https://github.com/addnab/docker-run-action/blob/main/action.yml for all the available inputs. -### Then why use docker-run-action? -- run on a privately-owned image. -- run on an image built by a previous step. -- run a specific step in docker +#### Typical Use Case -### Example Usage - -#### single-line command ```yaml - uses: addnab/docker-run-action@v1 with: - image: docker:latest - run: echo "hello world" -``` - -#### multi-line commands -```yaml -- uses: addnab/docker-run-action@v1 - with: - image: docker:latest + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + registry: gcr.io + image: private-image:latest + options: -v $GITHUB_WORKSPACE:/work -e ABC=123 run: | - echo "first line" - echo "second line" + ./run-script ``` -#### run on a privately-owned image +#### run a privately-owned image ```yaml - uses: addnab/docker-run-action@v1 with: @@ -38,7 +30,7 @@ Github Workflows already supports running on public docker images out-of-the-box run: echo "hello world" ``` -#### run on an image built by a previous step +#### run an image built by a previous step ```yaml - uses: docker/build-push-action@v1 with: @@ -62,13 +54,3 @@ Github Workflows already supports running on public docker images out-of-the-box echo "first line" echo "second line" ``` - -#### use docker options -```yaml -- uses: addnab/docker-run-action@v1 - with: - image: docker:latest - options: -v $GITHUB_WORKSPACE:/work -e ABC=123 - run: | - echo "first line" -```