No description
renovate-bot
111da0f4de
All checks were successful
run tests / run-container (pull_request) Successful in 16s
|
||
---|---|---|
.gitea/workflows | ||
.gitignore | ||
action.yml | ||
Dockerfile | ||
entrypoint.sh | ||
README.md | ||
renovate.json | ||
test.yml |
Docker Run Action
features:
- run a specific step/command in i docker image
- run an image built by a previous step
- See action.yml for all the available inputs
Examples
Typical Use Case
- name: Checkout
uses: actions/checkout@v3 # Required to mount the Github Workspace to a volume
- uses: git.44net.ch/actions/docker-run-action@v1
env:
ABC: 123
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: ghcr.io
image: some-image:latest
volumes: >-
./testscript.sh:/testscript.sh
/abc/def:/tmp
options: >-
--user abc
run: >-
/bin/bash
/testscript.sh
run a privately-owned image
- uses: git.44net.ch/actions/docker-run-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
registry: gcr.io
image: some-image:latest
run: echo "hello world"
run an image built by a previous step
- uses: docker/build-push-action@v2
with:
tags: some-image:latest
push: false
- uses: git.44net.ch/actions/docker-run-action@v1
with:
image: some-image:latest
run: echo "hello world"
use a specific shell (default: sh).
Note: The shell must be installed in the container
- uses: git.44net.ch/actions/docker-run-action@v1
with:
image: docker:latest
shell: bash
run: >-
echo "first line"
echo "second line"