Skip to content

Commit

Permalink
feat: add untrusted gitlab-runner for Garuda org
Browse files Browse the repository at this point in the history
  • Loading branch information
dr460nf1r3 committed Nov 7, 2023
1 parent 8ff32d7 commit 71eeb4d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
10 changes: 10 additions & 0 deletions docker-compose/gitlab-runner/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
version: "3.9"
services:
gitlab-runner:
image: gitlab/gitlab-runner:alpine
container_name: gitlab-runner
volumes:
- /etc/gitlab-runner:/etc/gitlab-runner
- /var/run/docker.sock:/var/run/docker.sock
restart: "no"
3 changes: 3 additions & 0 deletions nixos/hosts/github-runner.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
envfile = "/var/garuda/secrets/github-runner.env";
source = ../../docker-compose/github-runner;
};
services.docker-compose-runner.gitlab-runner = {
source = ../../docker-compose/gitlab-runner;
};

# Enable SSH
services.openssh.enable = true;
Expand Down
15 changes: 11 additions & 4 deletions nixos/hosts/immortalis/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,17 @@ in
config = import ../github-runner.nix;
defaults = false;
extraOptions = {
bindMounts."token" = {
hostPath = garuda-lib.secrets.docker-compose.github-runner;
isReadOnly = true;
mountPoint = "/var/garuda/secrets/github-runner.env";
bindMounts = {
"token" = {
hostPath = garuda-lib.secrets.docker-compose.github-runner;
isReadOnly = true;
mountPoint = "/var/garuda/secrets/github-runner.env";
};
"gitlab-config" = {
hostPath = "/data_1/containers/github-runner/gitlab-runner";
isReadOnly = false;
mountPoint = "/etc/gitlab-runner";
};
};
forwardPorts = [
{
Expand Down

0 comments on commit 71eeb4d

Please sign in to comment.