GitHub action to run steps using docker
...
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- 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"
...
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"
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 |
OUTPUT | TYPE | DESCRIPTION |
---|---|---|
container-id | string | Container ID |
- Free software: MIT license
If you feel generous and want to show some extra appreciation:
This package was created with Cookiecutter using cookiecutter-action
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.