2020-06-17 21:21:47 -04:00
2020-06-17 18:47:31 -04:00
2020-06-17 21:21:47 -04:00
2020-06-17 19:03:19 -04:00
2020-06-17 21:21:47 -04:00
2020-06-17 17:53:48 -04:00
2020-06-17 21:21:47 -04:00

Docker Run Action

This action targets a very specific use-case that is not currently supported by Github Workflows. This action gives you the capability to run built containers.

Docker already supports running commands inside a docker image. See jobs.<jobs_id>.container. But it doesn't give you a clean way to run an image from a private repo or an image built by a previous step.

Example Usage

single-line command

- uses: addnab/docker-run-action@v1
  with:
    image: docker:latest
    run: echo "hello world"

multi-line commands

- uses: addnab/docker-run-action@v1
  with:
    image: docker:latest
    run: |
      echo "first line"
      echo "second line"      

Run on previously built container.

- uses: docker/build-push-action@v1
  with:
    repository: test-image
    push: false
- uses: addnab/docker-run-action@v1
  with:
    image: test-image:latest
    run: echo "hello world"

use a specific shell (default: sh).

Note: The shell must be installe in the container

- uses: addnab/docker-run-action@v1
  with:
    image: docker:latest
    shell: bash
    run: |
      echo "first line"
      echo "second line"      
Description
No description provided
Readme MIT
Languages
Shell 79.7%
Dockerfile 20.3%