Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM --platform=$TARGETPLATFORM ubuntu:22.04

ARG TARGETARCH
ARG OS=linux
ARG VERSION=2.324.0
ARG VERSION

RUN apt update && apt install -y curl wget sudo git jq ca-certificates gnupg lsb-release && \
mkdir -p /etc/apt/keyrings && \
Expand All @@ -17,7 +17,11 @@ RUN useradd -G sudo,docker -ms /bin/bash github && \
USER github
WORKDIR /home/github/actions

RUN if [ "${TARGETARCH}" = "amd64" ]; then \
RUN if [ -z "${VERSION}" ]; then \
VERSION=$(curl -s https://api.github.com/repos/actions/runner/releases/latest | jq -r '.tag_name' | sed 's/^v//') ; \
echo "Fetched latest version: ${VERSION}" ; \
fi ; \
if [ "${TARGETARCH}" = "amd64" ]; then \
curl -o actions-runner-${OS}.tar.gz -fsSL https://github.com/actions/runner/releases/download/v${VERSION}/actions-runner-${OS}-x64-${VERSION}.tar.gz ; \
fi ; \
if [ "${TARGETARCH}" = "arm64" ]; then \
Expand Down