tj-actions / docker-run

:octocat: GitHub action to run steps using docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CI Update release version. Public workflows that use this action.

docker-run

GitHub action to run steps using docker

Examples

Using a locally built image

...
    steps:
      - uses: actions/checkout@v2

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v2.1.0

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2.2.1

      - name: Build
        uses: docker/build-push-action@v3
        with:
          context: .
          load: true
          push: false
          tags: user/app:latest
      
      - name: Run
        uses: tj-actions/docker-run@v2
        with:
          image: user/app:latest
          name: user-app
          args: |
            echo "Hello World"

Using an image from a registry

...
    steps:
      - uses: actions/checkout@v2
      
      - name: Run ubuntu from dockerhub
        uses: tj-actions/docker-run@v2
        with:
          image: ubuntu:latest  # OR gcr.io/cloud-builders/gradle
          name: ubuntu
          args: |
            echo "Hello World"

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
args string false Command to run
image string true Docker image
name string true Container name
options string false Options to pass to docker
run

Outputs

OUTPUT TYPE DESCRIPTION
container-id string Container ID

If you feel generous and want to show some extra appreciation:

Buy me a coffee

Credits

This package was created with Cookiecutter using cookiecutter-action

Report Bugs

Report bugs at https://github.com/tj-actions/docker-run/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your workflow that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

About

:octocat: GitHub action to run steps using docker

License:MIT License


Languages

Language:Dockerfile 86.5%Language:Shell 13.5%