File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ LABEL maintainer="3vilpenguin@gmail.com"
33
44ARG GIT_VERSION="2.23.0"
55ARG GH_RUNNER_VERSION="2.165.1"
6+ ARG TARGETPLATFORM
67
78SHELL ["/bin/bash" , "-o" , "pipefail" , "-c" ]
89# hadolint ignore=DL3003
@@ -43,7 +44,7 @@ WORKDIR /actions-runner
4344COPY install_actions.sh /actions-runner
4445
4546RUN chmod +x /actions-runner/install_actions.sh \
46- && /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} \
47+ && /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} ${TARGETPLATFORM} \
4748 && rm /actions-runner/install_actions.sh
4849
4950WORKDIR /_work
Original file line number Diff line number Diff line change 11#! /bin/bash -x
22GH_RUNNER_VERSION=$1
3+ TARGETPLATFORM=$2
34
4- export ACTIONS_ARCH =" x64"
5- if [[ $( dpkg --print-architecture ) == " armhf " ]]; then
6- export ACTIONS_ARCH =" arm"
7- elif [[ $( dpkg --print-architecture ) == " arm64" ]]; then
8- export ACTIONS_ARCH =" arm64"
5+ export TARGET_ARCH =" x64"
6+ if [[ $TARGETPLATFORM == " linux/arm/v7 " ]]; then
7+ export TARGET_ARCH =" arm"
8+ elif [[ $TARGETPLATFORM == " linux/ arm64" ]]; then
9+ export TARGET_ARCH =" arm64"
910fi
10- curl -L " https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION} /actions-runner-linux-x64 -${GH_RUNNER_VERSION} .tar.gz" > actions.tar.gz
11+ curl -L " https://github.com/actions/runner/releases/download/v${GH_RUNNER_VERSION} /actions-runner-linux-${TARGET_ARCH} -${GH_RUNNER_VERSION} .tar.gz" > actions.tar.gz
1112tar -zxf actions.tar.gz
1213rm -f actions.tar.gz
1314./bin/installdependencies.sh
You can’t perform that action at this time.
0 commit comments