tj-actions / docker-run Goto Github PK
View Code? Open in Web Editor NEW:octocat: GitHub action to run steps using docker
License: MIT License
:octocat: GitHub action to run steps using docker
License: MIT License
I need to run two commands using the same image. But the second one of those two steps failed with an error.
If you use the Using an image from a registry example from readme but copy it to use the same image twice it will likely cause the same errror.
ubuntu-latest or ubuntu-22.04
No error.
docker: Error response from daemon: Conflict. The container name "/<redacted>" is already in use by container "<redacted>". You have to remove (or rename) that container to be able to reuse that name.
### Has all relevant logs been included?
- [X] I've included all relevant logs
### Anything else?
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I would like to run with option --platform
I would like to run with option --platform
No response
No response
No.
When running a docker container, it will not always be required to run a command.
Take this example:
- name: 'Start service container'
id: start
run: 'docker run --detach --rm --name ${{ steps.setup.outputs.repository_name }} --network ${{ steps.setup.outputs.github_network }} --network-alias ${{ steps.setup.outputs.repository_name }} --publish 8003:80 --health-cmd "curl -s -I -L -o /dev/null -X POST --url "http://localhost/checks/connection-check/"" --health-interval 10s --health-timeout 5s --health-retries 5 --env "HEALTH_CHECK_TOKEN=${{ secrets.HEALTH_CHECK_TOKEN }}" --env "GITHUB_ACTIONS=true" --env "CI=true" ${{ steps.setup.outputs.repository_owner }}/${{ steps.setup.outputs.repository_name }}:latest'
shell: bash
- name: 'Wait for service to be ready'
id: wait
timeout-minutes: 1
run: 'while [ "$( docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" ${{ steps.setup.outputs.repository_name }} )" == "starting" ]; do sleep 1s; done;'
shell: bash
This docker container will be running on the workflow and available to be used in other steps as a service.
P.S.:
Notice the step to ensure the docker container will be ready to be used in the next steps. This should also be considered in this action.
No response
No response
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/auto-approve.yml
hmarr/auto-approve-action v3
.github/workflows/greetings.yml
actions/first-interaction v1
.github/workflows/rebase.yml
actions/checkout v4
cirrus-actions/rebase 1.8
.github/workflows/sync-release-version.yml
actions/checkout v4
tj-actions/release-tagger v4
tj-actions/sync-release-version v13
tj-actions/git-cliff v1
peter-evans/create-pull-request v5
.github/workflows/test.yml
actions/checkout v4
reviewdog/action-shellcheck v1
docker/setup-qemu-action v2.2.0
docker/setup-buildx-action v3.0.0
docker/build-push-action v5
.github/workflows/update-readme.yml
actions/checkout v4
tj-actions/auto-doc v3
tj-actions/remark v3
tj-actions/verify-changed-files v16
peter-evans/create-pull-request v5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.