Merge pull request #5 from Pentusha/master

Multiarch builds fixed for #4
This commit is contained in:
myoung34
2020-02-05 13:42:42 -06:00
committed by GitHub
2 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ LABEL maintainer="[email protected]"
ARG GIT_VERSION="2.23.0"
ARG GH_RUNNER_VERSION="2.165.1"
ARG TARGETPLATFORM
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003
@@ -43,7 +44,7 @@ WORKDIR /actions-runner
COPY install_actions.sh /actions-runner
RUN chmod +x /actions-runner/install_actions.sh \
&& /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} \
&& /actions-runner/install_actions.sh ${GH_RUNNER_VERSION} ${TARGETPLATFORM} \
&& rm /actions-runner/install_actions.sh
WORKDIR /_work
+7 -6
View File
@@ -1,13 +1,14 @@
#!/bin/bash -x
GH_RUNNER_VERSION=$1
TARGETPLATFORM=$2
export ACTIONS_ARCH="x64"
if [[ $(dpkg --print-architecture) == "armhf" ]]; then
export ACTIONS_ARCH="arm"
elif [[ $(dpkg --print-architecture) == "arm64" ]]; then
export ACTIONS_ARCH="arm64"
export TARGET_ARCH="x64"
if [[ $TARGETPLATFORM == "linux/arm/v7" ]]; then
export TARGET_ARCH="arm"
elif [[ $TARGETPLATFORM == "linux/arm64" ]]; then
export TARGET_ARCH="arm64"
fi
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
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
tar -zxf actions.tar.gz
rm -f actions.tar.gz
./bin/installdependencies.sh