Skip to content

Commit 27cfe4c

Browse files
authored
feat: support replicas
1 parent f165166 commit 27cfe4c

File tree

4 files changed

+7
-31
lines changed

4 files changed

+7
-31
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PAT=<Replace with your personal access token>
22
ORGANIZATION_URL=<Organization url>
33
# Vagrant image settings
4-
MEMORY=10000 # 10GB
4+
MEMORY=8000 # 8GB
55
CPU=4
66
DISK_SIZE=100

README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A implementation of windows github custom runner based on vagrant VM, libvirt an
1515
PAT=<Replace with your personal access token>
1616
ORGANIZATION_URL=<Organization url>
1717
# Vagrant image settings
18-
MEMORY=10000 # 10GB
18+
MEMORY=8000 # 8GB
1919
CPU=4
2020
DISK_SIZE=100
2121
```
@@ -26,8 +26,6 @@ version: "3.9"
2626
services:
2727
win10:
2828
image: ghcr.io/vaggeliskls/windows-github-custom-runner:latest
29-
container_name: win10
30-
hostname: win10
3129
env_file: .env
3230
stdin_open: true
3331
tty: true
@@ -40,19 +38,8 @@ services:
4038
devices:
4139
- /dev/kvm
4240
- /dev/net/tun
43-
ports:
44-
- 3389:3389
45-
networks:
46-
win10-net:
47-
ipv4_address: 10.1.1.16
48-
49-
networks:
50-
win10-net:
51-
driver: bridge
52-
ipam:
53-
config:
54-
- subnet: 10.1.1.0/24
55-
gateway: 10.1.1.1
41+
deploy:
42+
replicas: 1
5643
```
5744
3. Run: `docker-compose up -d`
5845

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Vagrant.configure("2") do |config|
3434
Set-Location actions-runner
3535
Invoke-WebRequest -Uri $GITHUB_RUNNER_URL -OutFile $GITHUB_RUNNER_FILE
3636
Expand-Archive $GITHUB_RUNNER_FILE -DestinationPath .
37-
./config.cmd --name $GITHUB_RUNNER_NAME --replace --unattended --url $ORGANIZATION_URL --labels $GITHUB_RUNNER_LABELS --pat $PAT
37+
./config.cmd --name $GITHUB_RUNNER_NAME_$RANDOM --replace --unattended --url $ORGANIZATION_URL --labels $GITHUB_RUNNER_LABELS --pat $PAT
3838
./run.cmd
3939
SHELL
4040
end

docker-compose.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ services:
55
build:
66
dockerfile: ./Dockerfile
77
context: .
8-
container_name: win10
9-
hostname: win10
108
env_file: .env
119
stdin_open: true
1210
tty: true
@@ -22,14 +20,5 @@ services:
2220
- /dev/net/tun
2321
ports:
2422
- 3389:3389
25-
networks:
26-
win10-net:
27-
ipv4_address: 10.1.1.16
28-
29-
networks:
30-
win10-net:
31-
driver: bridge
32-
ipam:
33-
config:
34-
- subnet: 10.1.1.0/24
35-
gateway: 10.1.1.1
23+
deploy:
24+
replicas: 1

0 commit comments

Comments
 (0)