Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options passed with docker-run-action returns error whereas checkout action works as expected #32

Open
supaflysnooka opened this issue Jan 5, 2022 · 0 comments

Comments

@supaflysnooka
Copy link

I'm attempting to utilize the options for docker-run-action and am running into issues. The options I'm attempting to run are from code located in a local Git repository and are as follows:

 - name: Build firewall rule definitions 
        uses: addnab/docker-run-action@v3
        with:
          image: xxx.artifactory.xxx.com/xxx/xxx:latest
          shell: bash
         options: -v ${{ github.workspace }}:/tf_files -v ${{ github.workspace }}:/rules.json xxx.artifactory.xxx.com/xxx/xxx/xxx/xxx:latest

Output from GitHub Actions:

Run addnab/docker-run-action@v3
  with:
    image: xxx.artifactory.xxx.com/xxx/xxx/xxx/xxx:latest
    shell: bash
    options: -v /usr/local/bin/actions-runner/_work/lab-fwaas-pipeline-bu/lab-fwaas-pipeline-bu:/tf_files -v /usr/local/bin/actions-runner/_work/lab-fwaas-pipeline-bu/lab-fwaas-pipeline-bu:/rules.json xxx.artifactory.xxx.com/xxx/xxx:latest
/usr/bin/docker run --name da03db67bcc03cd34707929c38a4ff1080d5_2da1b3 --label 88da03 --workdir /github/workspace --rm -e INPUT_IMAGE -e INPUT_SHELL -e INPUT_OPTIONS -e INPUT_RUN -e INPUT_REGISTRY -e INPUT_USERNAME -e INPUT_PASSWORD -e INPUT_DOCKER_NETWORK -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/usr/local/bin/actions-runner/_work/_temp/_github_home":"/github/home" -v "/usr/local/bin/actions-runner/_work/_temp/_github_workflow":"/github/workflow" -v "/usr/local/bin/actions-runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/usr/local/bin/actions-runner/_work/lab-fwaas-pipeline-bu/lab-fwaas-pipeline-bu":"/github/workspace" 88da03:db67bcc03cd34707929c38a4ff1080d5
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "--entrypoint=bash": executable file not found in $PATH: unknown.
time="2022-01-04T22:42:24Z" level=error msg="error waiting for container: context canceled"

Whereas execution from run command via actions/checkout@v2 works without issue:

- uses: actions/checkout@v2
(login to artifactory and pull here)
- name: Run image
        run:  docker run -u 0 -v ${PWD}/tf_files:/app/tf_files -v ${PWD}/rules.json:/app/rules.jsonxxx.artifactory.xxx.com/xxx/xxx/xxx/xxx:latest

Logs:

1s
Run docker run -u 0 -v ${PWD}/tf_files:/app/tf_files -v ${PWD}/rules.json:/app/rules.json xxx.artifactory.xxx.com/xxx/xxx/xxx/xxx:latest
  docker run -u 0 -v ${PWD}/tf_files:/app/tf_files -v ${PWD}/rules.json:/app/rules.json xxx.artifactory.xxx.com/xxx/xxx/xxx/xxx:latest
  shell: /usr/bin/bash -e {0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant