https://github.com/philips-software/run-windows-docker-container-action
Action to run windows containers
https://github.com/philips-software/run-windows-docker-container-action
Last synced: 10 months ago
JSON representation
Action to run windows containers
- Host: GitHub
- URL: https://github.com/philips-software/run-windows-docker-container-action
- Owner: philips-software
- License: mit
- Created: 2022-10-04T19:06:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-23T19:53:52.000Z (over 1 year ago)
- Last Synced: 2025-03-31T04:37:25.649Z (about 1 year ago)
- Language: PowerShell
- Size: 26.4 KB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Action for running commands in a windows docker container
## State
[](https://github.com/philips-software/run-windows-docker-container-action/actions/workflows/test.yml)
## Description
Composite action for running commands in windows docker containers.
## Usage
Very simple hello world example:
```
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Test_Run
uses: philips-software/run-windows-docker-container-action@
with:
image: mcr.microsoft.com/windows/servercore:20H2
entrypoint: powershell.exe
run: >-
echo "Hello world";
./run-test-script.ps1;
```
## Default environment
This action tries to stay close to GitHub's Action environment, and
as such all GitHub defined [default environment variables](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables) are passed
to the container by default.
By default, the github workspace directory is mapped to the docker volume path
and work path.
## Inputs
| parameter | description | required | default |
| - | - | - | - |
| image | Docker image. | `true` | |
| run | Command to execute. | `true` | |
| workspace_path | Workspace path. Default is root workspace path. | `false` | |
| mapping_path | Mapping path, i.e. path to where the workspace path is mapped in the docker container. Defaults to workspace_path. | `false` | |
| work_path | Work path, i.e. path where the command in the docker container is executed. Defaults to workspace_path. | `false` | |
| memory | Memory limit. See docker documentation on --memory. | `false` | 4GB |
| entrypoint | Overrides the default ENTRYPOINT in docker image. | `false` | |
| env_names | Environment variable names passed to docker image as comma separated list, for example: NAME1, NAME2, NAME3 | `false` | |
| extra_args | Extra arguments for docker run command. | `false` | |
| pre-warm | Run a warming-up container (which might crash due to first time use failure) | `false` | true |
| pre-warm-cmd | Pre warm command to run inside the container | `false` | echo "warming up!" |
| registry_authentication | Authenticate against registry server | `false` | false |
| registry_username | Docker registry username. | `false` | |
| registry_token | Docker registry token | `false` | |
| registry_repository | Docker registry repository | `false` | |
## Runs
This action is a `composite` action.
## Contributing
Please refer to our [Contributing](CONTRIBUTING.md) guide when you want to contribute to this project.
## License
Run-Windows-Docker-Container is licenced under the [MIT](https://choosealicense.com/licenses/mit/) license. See [LICENSE file](LICENSE).