File tree 3 files changed +14
-4
lines changed
3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 53
53
uses : docker/build-push-action@v3
54
54
with :
55
55
context : ./images
56
+ platforms : |
57
+ linux/amd64
58
+ linux/arm64
56
59
tags : |
57
60
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.version }}
58
61
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
Original file line number Diff line number Diff line change @@ -699,6 +699,9 @@ jobs:
699
699
uses : docker/build-push-action@v3
700
700
with :
701
701
context : ./images
702
+ platforms : |
703
+ linux/amd64
704
+ linux/arm64
702
705
tags : |
703
706
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.image.outputs.version }}
704
707
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
Original file line number Diff line number Diff line change 1
1
# Source: https://github.com/dotnet/dotnet-docker
2
2
FROM mcr.microsoft.com/dotnet/runtime-deps:6.0-jammy as build
3
3
4
+ ARG TARGETOS
5
+ ARG TARGETARCH
4
6
ARG RUNNER_VERSION
5
- ARG RUNNER_ARCH="x64"
6
7
ARG RUNNER_CONTAINER_HOOKS_VERSION=0.3.2
7
8
ARG DOCKER_VERSION=20.10.23
8
9
9
10
RUN apt update -y && apt install curl unzip -y
10
11
11
12
WORKDIR /actions-runner
12
- RUN curl -f -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${RUNNER_ARCH}-${RUNNER_VERSION}.tar.gz \
13
+ RUN export RUNNER_ARCH=${TARGETARCH} \
14
+ && if [ "$RUNNER_ARCH" = "amd64" ]; then export RUNNER_ARCH=x64 ; fi \
15
+ && curl -f -L -o runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-${TARGETOS}-${RUNNER_ARCH}-${RUNNER_VERSION}.tar.gz \
13
16
&& tar xzf ./runner.tar.gz \
14
17
&& rm runner.tar.gz
15
18
16
19
RUN curl -f -L -o runner-container-hooks.zip https://github.com/actions/runner-container-hooks/releases/download/v${RUNNER_CONTAINER_HOOKS_VERSION}/actions-runner-hooks-k8s-${RUNNER_CONTAINER_HOOKS_VERSION}.zip \
17
20
&& unzip ./runner-container-hooks.zip -d ./k8s \
18
21
&& rm runner-container-hooks.zip
19
22
20
- RUN export DOCKER_ARCH=x86_64 \
23
+ RUN export RUNNER_ARCH=${TARGETARCH} \
24
+ && if [ "$RUNNER_ARCH" = "amd64" ]; then export DOCKER_ARCH=x86_64 ; fi \
21
25
&& if [ "$RUNNER_ARCH" = "arm64" ]; then export DOCKER_ARCH=aarch64 ; fi \
22
- && curl -fLo docker.tgz https://download.docker.com/linux /static/stable/${DOCKER_ARCH}/docker-${DOCKER_VERSION}.tgz \
26
+ && curl -fLo docker.tgz https://download.docker.com/${TARGETOS} /static/stable/${DOCKER_ARCH}/docker-${DOCKER_VERSION}.tgz \
23
27
&& tar zxvf docker.tgz \
24
28
&& rm -rf docker.tgz
25
29
You can’t perform that action at this time.
0 commit comments