Skip to content

Commit

Permalink
Use s390x native actions runner binaries (#64)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
theihor authored Dec 5, 2024
1 parent b7f585b commit cc3777f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
arch: [s390x, aarch64, x86_64]
include:
- arch: s390x
dockerfile: s390x.Dockerfile
dockerfile: s390x-native.Dockerfile
platform: linux/s390x
- arch: aarch64
dockerfile: Dockerfile
Expand Down
38 changes: 38 additions & 0 deletions s390x-native.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Self-Hosted IBM Z Github Actions Runner.
ARG UBUNTU_VERSION=noble
FROM --platform=linux/s390x ubuntu:${UBUNTU_VERSION}

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

Check warning on line 3 in s390x-native.Dockerfile

View workflow job for this annotation

GitHub Actions / build (noble, s390x)

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/s390x" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get -y install \
bc bison cmake cpu-checker curl dumb-init ethtool flex gawk git \
iproute2 iptables iputils-ping jq keyutils linux-image-generic \
python3 rsync software-properties-common sudo tree wget zstd
RUN apt-get -y install \
qemu-guest-agent qemu-kvm qemu-utils \
qemu-system-arm qemu-system-s390x qemu-system-x86
RUN apt-get install -y \
aspnetcore-runtime-8.0
RUN apt-get clean

ARG version=2.321.0
ARG homedir=/actions-runner

# Copy scripts from myoung34/docker-github-actions-runner
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${version}/entrypoint.sh -o /entrypoint.sh && chmod 755 /entrypoint.sh
RUN curl -L https://raw.githubusercontent.com/myoung34/docker-github-actions-runner/${version}/token.sh -o /token.sh && chmod 755 /token.sh

RUN useradd -d ${homedir} -m runner
RUN echo "runner ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
RUN echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >>/etc/sudoers
# Make sure kvm group exists. This is a no-op when it does.
RUN addgroup --system kvm
RUN usermod -a -G kvm runner
USER runner
ENV USER=runner
WORKDIR ${homedir}

RUN curl -L https://github.com/theihor/s390x-actions-runner/releases/download/v${version}/actions-runner-linux-s390x-${version}.tar.gz | tar -xz
USER root

ENTRYPOINT ["/entrypoint.sh"]
CMD ["./bin/Runner.Listener", "run", "--startuptype", "service"]

0 comments on commit cc3777f

Please sign in to comment.