Skip to content

Commit cc3777f

Browse files
authored
Use s390x native actions runner binaries (#64)
Add a s390x Dockerfile utilizing custom-built s390x-native runner: https://github.com/theihor/s390x-actions-runner/releases/tag/v2.321.0 Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me>
1 parent b7f585b commit cc3777f

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
arch: [s390x, aarch64, x86_64]
4444
include:
4545
- arch: s390x
46-
dockerfile: s390x.Dockerfile
46+
dockerfile: s390x-native.Dockerfile
4747
platform: linux/s390x
4848
- arch: aarch64
4949
dockerfile: Dockerfile

s390x-native.Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Self-Hosted IBM Z Github Actions Runner.
2+
ARG UBUNTU_VERSION=noble
3+
FROM --platform=linux/s390x ubuntu:${UBUNTU_VERSION}
4+
ENV DEBIAN_FRONTEND=noninteractive
5+
6+
RUN apt-get update && apt-get -y install \
7+
bc bison cmake cpu-checker curl dumb-init ethtool flex gawk git \
8+
iproute2 iptables iputils-ping jq keyutils linux-image-generic \
9+
python3 rsync software-properties-common sudo tree wget zstd
10+
RUN apt-get -y install \
11+
qemu-guest-agent qemu-kvm qemu-utils \
12+
qemu-system-arm qemu-system-s390x qemu-system-x86
13+
RUN apt-get install -y \
14+
aspnetcore-runtime-8.0
15+
RUN apt-get clean
16+
17+
ARG version=2.321.0
18+
ARG homedir=/actions-runner
19+
20+
# Copy scripts from myoung34/docker-github-actions-runner
21+
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${version}/entrypoint.sh -o /entrypoint.sh && chmod 755 /entrypoint.sh
22+
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${version}/token.sh -o /token.sh && chmod 755 /token.sh
23+
24+
RUN useradd -d ${homedir} -m runner
25+
RUN echo "runner ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
26+
RUN echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >>/etc/sudoers
27+
# Make sure kvm group exists. This is a no-op when it does.
28+
RUN addgroup --system kvm
29+
RUN usermod -a -G kvm runner
30+
USER runner
31+
ENV USER=runner
32+
WORKDIR ${homedir}
33+
34+
RUN curl -L https://github.com/theihor/s390x-actions-runner/releases/download/v${version}/actions-runner-linux-s390x-${version}.tar.gz | tar -xz
35+
USER root
36+
37+
ENTRYPOINT ["/entrypoint.sh"]
38+
CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"]

0 commit comments

Comments
 (0)