43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
# act-runner-windows-cursed
|
|
|
|
this allows you to run a node20(git & choco included) + windows server 2022 + act-runner system with a single command & config files
|
|
|
|
# setup
|
|
you need docker, i reccomend installing it via
|
|
```ps1
|
|
iwr https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1 -outfile install-docker-ce.ps1
|
|
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
|
|
.\install-docker-ce.ps1
|
|
```
|
|
|
|
(it'll restart once to install container and hyper-v stuff)
|
|
|
|
# mini tutorial
|
|
|
|
```ps1
|
|
|
|
mkdir runner
|
|
|
|
cd runner
|
|
|
|
mkdir data
|
|
|
|
iwr https://git.sad.ovh/sophie/act-runner-windows-cursed/raw/branch/main/config.yml -outfile data\config.yml
|
|
|
|
cmd /C "icacls $((Get-Item .).FullName)\data /grant Everyone:(F) /T"
|
|
|
|
docker run -v ./data:C:\data -v '\\.\pipe\docker_engine:\\.\pipe\docker_engine' `
|
|
-e GITEA_INSTANCE_URL=https://git.sad.ovh `
|
|
-e GITEA_RUNNER_REGISTRATION_TOKEN=regtoken `
|
|
-e GITEA_RUNNER_NAME=windows `
|
|
-e CONFIG_FILE=config.yml `
|
|
--user ContainerAdministrator `
|
|
--name act_windows git.sad.ovh/sophie/act-runner-windows-cursed
|
|
|
|
# it'll register and you gotta restart it (click ctrl+c 3 times), and make sure to delete it after you restart it, via `docker rm act_windows`
|
|
|
|
# this allows .runner & data & config.yml to be read by the docker container (and also everyone, but whatever, this is a POC atm)
|
|
|
|
cmd /C "icacls C:\Users\Docker\forgejo\data /grant Everyone:(F) /T"
|
|
# also, after this, modify .runner to have `windows-node-iron:host` in the labels: [] part
|
|
```
|