Skip to content

Commit

Permalink
change home paths to match upstream (some-natalie#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
some-natalie authored May 1, 2024
1 parent d479b82 commit 029ef0a
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion deployments/helm-ubi8-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ template:
- name: runner
image: ghcr.io/some-natalie/kubernoodles/ubi8:test
imagePullPolicy: Always
command: ["/actions-runner/run.sh"]
command: ["/home/runner/run.sh"]
2 changes: 1 addition & 1 deletion deployments/helm-ubi8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ template:
containers:
- name: runner
image: ghcr.io/some-natalie/kubernoodles/ubi8:latest
command: ["/actions-runner/run.sh"]
command: ["/home/runner/run.sh"]
2 changes: 1 addition & 1 deletion deployments/helm-ubi9-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ template:
- name: runner
image: ghcr.io/some-natalie/kubernoodles/ubi9:test
imagePullPolicy: Always
command: ["/actions-runner/run.sh"]
command: ["/home/runner/run.sh"]
2 changes: 1 addition & 1 deletion deployments/helm-ubi9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ template:
containers:
- name: runner
image: ghcr.io/some-natalie/kubernoodles/ubi9:latest
command: ["/actions-runner/run.sh"]
command: ["/home/runner/run.sh"]
6 changes: 3 additions & 3 deletions deployments/helm-wolfi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ template:
containers:
- name: runner
image: ghcr.io/some-natalie/kubernoodles/wolfi-runner:test
command: ["/actions-runner/run.sh"]
command: ["/home/runner/run.sh"]
securityContext:
runAsUser: 100
runAsGroup: 100
env:
- name: ACTIONS_RUNNER_CONTAINER_HOOKS
value: /actions-runner/k8s/index.js
value: /home/runner/k8s/index.js
- name: ACTIONS_RUNNER_POD_NAME
valueFrom:
fieldRef:
Expand All @@ -55,7 +55,7 @@ template:
value: "false" # allow non-container steps
volumeMounts:
- name: work
mountPath: /actions-runner/_work
mountPath: /home/runner/_work

containerMode:
type: "kubernetes"
Expand Down
6 changes: 3 additions & 3 deletions deployments/helm-wolfi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ template:
containers:
- name: runner
image: ghcr.io/some-natalie/kubernoodles/wolfi-runner:test
command: ["/actions-runner/run.sh"]
command: ["/home/runner/run.sh"]
securityContext:
runAsUser: 100
runAsGroup: 100
env:
- name: ACTIONS_RUNNER_CONTAINER_HOOKS
value: /actions-runner/k8s/index.js
value: /home/runner/k8s/index.js
- name: ACTIONS_RUNNER_POD_NAME
valueFrom:
fieldRef:
Expand All @@ -54,7 +54,7 @@ template:
value: "false" # allow non-container steps
volumeMounts:
- name: work
mountPath: /actions-runner/_work
mountPath: /home/runner/_work

containerMode:
type: "kubernetes"
Expand Down
8 changes: 4 additions & 4 deletions images/ubi8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ RUN useradd -G 0 $USERNAME
ENV HOME /home/${USERNAME}

# Make and set the working directory
RUN mkdir -p /actions-runner \
&& chown -R $USERNAME:$GID /actions-runner
RUN mkdir -p /home/runner \
&& chown -R $USERNAME:$GID /home/runner

WORKDIR /actions-runner
WORKDIR /home/runner

# Install GitHub CLI
COPY images/software/gh-cli.sh gh-cli.sh
Expand Down Expand Up @@ -80,7 +80,7 @@ RUN curl -f -L -o runner-container-hooks.zip /~https://github.com/actions/runner-c
# Copy in custom logger and startup script
COPY images/logger.sh images/startup.sh /usr/bin/
RUN chmod +x /usr/bin/startup.sh \
&& chown -R $USERNAME:$UID /actions-runner
&& chown -R $USERNAME:$UID /home/runner

USER $USERNAME

Expand Down
8 changes: 4 additions & 4 deletions images/ubi9.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ RUN useradd -G 0 $USERNAME
ENV HOME /home/${USERNAME}

# Make and set the working directory
RUN mkdir -p /actions-runner \
&& chown -R $USERNAME:$GID /actions-runner
RUN mkdir -p /home/runner \
&& chown -R $USERNAME:$GID /home/runner

WORKDIR /actions-runner
WORKDIR /home/runner

# Install GitHub CLI
COPY images/software/gh-cli.sh gh-cli.sh
Expand Down Expand Up @@ -80,7 +80,7 @@ RUN curl -f -L -o runner-container-hooks.zip /~https://github.com/actions/runner-c
# Copy in custom logger and startup script
COPY images/logger.sh images/startup.sh /usr/bin/
RUN chmod +x /usr/bin/startup.sh \
&& chown -R $USERNAME:$UID /actions-runner
&& chown -R $USERNAME:$UID /home/runner

USER $USERNAME

Expand Down
12 changes: 6 additions & 6 deletions images/wolfi.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ RUN apk update \
RUN export PATH=$HOME/.local/bin:$PATH

# Make and set the working directory
RUN mkdir -p /actions-runner \
&& chown -R runner:runner /actions-runner
RUN mkdir -p /home/runner \
&& chown -R runner:runner /home/runner

WORKDIR /actions-runner
WORKDIR /home/runner

RUN test -n "$TARGETPLATFORM" || (echo "TARGETPLATFORM must be set" && false)

Expand All @@ -58,8 +58,8 @@ RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \
&& rm runner.tar.gz

# remove bundled nodejs and symlink to system nodejs
RUN rm /actions-runner/externals/node16/bin/node && ln -s /usr/bin/node /actions-runner/externals/node16/bin/node
RUN rm /actions-runner/externals/node20/bin/node && ln -s /usr/bin/node /actions-runner/externals/node20/bin/node
RUN rm /home/runner/externals/node16/bin/node && ln -s /usr/bin/node /home/runner/externals/node16/bin/node
RUN rm /home/runner/externals/node20/bin/node && ln -s /usr/bin/node /home/runner/externals/node20/bin/node

# Install container hooks
RUN curl -f -L -o runner-container-hooks.zip /~https://github.com/actions/runner-container-hooks/releases/download/v${RUNNER_CONTAINER_HOOKS_VERSION}/actions-runner-hooks-k8s-${RUNNER_CONTAINER_HOOKS_VERSION}.zip \
Expand All @@ -75,7 +75,7 @@ RUN chmod -R 777 /opt /usr/share
# Copy in custom logger and startup script
COPY images/logger.sh images/startup.sh /usr/bin/
RUN chmod +x /usr/bin/startup.sh \
&& chown -R runner:runner /actions-runner
&& chown -R runner:runner /home/runner

USER runner

Expand Down

0 comments on commit 029ef0a

Please sign in to comment.