{"id":16111789,"url":"https://github.com/cliffano/command-docker-action","last_synced_at":"2026-02-13T11:50:23.559Z","repository":{"id":248711535,"uuid":"828389627","full_name":"cliffano/command-docker-action","owner":"cliffano","description":"GitHub Action for running a shell command via a Docker container","archived":false,"fork":false,"pushed_at":"2025-02-08T00:11:49.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T01:41:24.897Z","etag":null,"topics":["docker","github-action","shell-command"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cliffano.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-14T02:09:19.000Z","updated_at":"2025-02-08T00:11:52.000Z","dependencies_parsed_at":"2024-12-19T14:27:31.098Z","dependency_job_id":"1e6ee1d4-8616-4380-b750-5fd25bd05c25","html_url":"https://github.com/cliffano/command-docker-action","commit_stats":null,"previous_names":["cliffano/command-docker-action"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cliffano/command-docker-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fcommand-docker-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fcommand-docker-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fcommand-docker-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fcommand-docker-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cliffano","download_url":"https://codeload.github.com/cliffano/command-docker-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cliffano%2Fcommand-docker-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273723144,"owners_count":25156302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","github-action","shell-command"],"created_at":"2024-10-09T19:45:32.564Z","updated_at":"2026-02-13T11:50:23.554Z","avatar_url":"https://github.com/cliffano.png","language":"Shell","readme":"\u003cimg align=\"right\" src=\"https://raw.github.com/cliffano/command-docker-action/master/avatar.jpg\" alt=\"Avatar\"/\u003e\n\n[![Build Status](https://github.com/cliffano/command-docker-action/workflows/CI/badge.svg)](https://github.com/cliffano/command-docker-action/actions?query=workflow%3ACI)\n[![Security Status](https://snyk.io/test/github/cliffano/command-docker-action/badge.svg)](https://snyk.io/test/github/cliffano/command-docker-action)\n\u003cbr/\u003e\n\nCommand Docker GitHub Action\n----------------------------\n\nA simple GitHub Action for running a shell command via a Docker container.\n\nThe command will be executed on a directory containing the GitHub repository content.\n\nUsage\n-----\n\nRun commands across Docker containers with different images and shells:\n\n    jobs:\n      build:\n        steps:\n          - name: 'Execute cat /etc/*-release using default sh shell via default alpine Docker container'\n            uses: cliffano/command-docker-action@main\n            with:\n              command: 'cat /etc/*-release'\n          - name: 'Execute cat /etc/*-release using bash shell via Ubuntu 24.04 Docker container'\n            uses: cliffano/command-docker-action@main\n            with:\n              command: 'cat /etc/*-release'\n              image: ubuntu:24.04\n              shell: bash\n          - name: 'Execute cat /etc/*-release using bash shell via Rocky Linux 9.3 Docker container'\n            uses: cliffano/command-docker-action@main\n            with:\n              command: 'cat /etc/*-release'\n              image: rockylinux:9.3\n              shell: bash\n\nRun command using environment variables passed via env file:\n\n    jobs:\n      build:\n        steps:\n          - uses: iamsauravsharma/create-dotenv@v4.0.0\n            with:\n              file-path: '/tmp/.env'\n            env:\n              SOME_ENV_VAR: 'Some value'\n          - name: 'Display environment variables'\n            uses: cliffano/command-docker-action@main\n            with:\n              command: 'echo \"SOME_ENV_VAR: $SOME_ENV_VAR\"'\n              env_file: '/tmp/.env'\n\nRun command with extra PATH environment variable:\n\n    jobs:\n      build:\n        steps:\n          - name: 'Run custom command from a custom path specified in extra_path'\n            uses: cliffano/command-docker-action@main\n            with:\n              command: 'mkdir -p /opt/workspace/bin/ \u0026\u0026 touch /opt/workspace/bin/some-exec \u0026\u0026 chmod +x /opt/workspace/bin/some-exec \u0026\u0026 which some-exec'\n              extra_path: '/some/path:/opt/workspace/bin'\n\nConfiguration\n-------------\n\n| Input | Type | Description | Required | Default | Example |\n|-------|------|-------------|----------|---------|---------|\n| command | string | Shell command to be executed via a Docker container | Yes | - |  `cat /etc/*-release` |\n| image | string | Docker image to be used for running the container | No | `alpine:3.22` | `ubuntu:24.04` |\n| extra_path | string | Extra PATH environment variable to be added to original PATH during shell command execution | No | `` | `/some/path:/opt/workspace/bin` |\n| shell | string | Shell to be used for running the command | No | `sh` | `sh`, `bash` |\n| env_file | string | Path to env file containing environment variables  made available during shell command execution | No | `` | `/tmp/.env` |\n\nFAQ\n---\n\nQ: Why does the command that should work on my container image result in a not found error or `No such file or directory`?\n\nA: This is because GitHub Actions overwrites the default PATH. E.g. `/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin` as of January 2025.\n   The solution to this problem is to use the `extra_path` input parameter to add the required path for your command to the PATH environment variable.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcliffano%2Fcommand-docker-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcliffano%2Fcommand-docker-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcliffano%2Fcommand-docker-action/lists"}