From 11dd2ac7457bd22080b9d8e5277327110563919a Mon Sep 17 00:00:00 2001 From: ab-pkandhari <132302443+ab-pkandhari@users.noreply.github.com> Date: Tue, 23 May 2023 07:26:47 -0500 Subject: [PATCH] fix: Update ARCH environment variable used in runners/actions (#1818) --- pkg/container/docker_run.go | 4 ++-- pkg/container/host_environment.go | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go index df296e0..65a373f 100644 --- a/pkg/container/docker_run.go +++ b/pkg/container/docker_run.go @@ -240,8 +240,8 @@ func RunnerArch(ctx context.Context) string { archMapper := map[string]string{ "x86_64": "X64", - "386": "x86", - "aarch64": "arm64", + "386": "X86", + "aarch64": "ARM64", } if arch, ok := archMapper[info.Architecture]; ok { return arch diff --git a/pkg/container/host_environment.go b/pkg/container/host_environment.go index e0a18c7..c6a2228 100644 --- a/pkg/container/host_environment.go +++ b/pkg/container/host_environment.go @@ -387,11 +387,13 @@ func (*HostEnvironment) JoinPathVariable(paths ...string) string { return strings.Join(paths, string(filepath.ListSeparator)) } +// Reference for Arch values for runner.arch +// https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context func goArchToActionArch(arch string) string { archMapper := map[string]string{ "x86_64": "X64", - "386": "x86", - "aarch64": "arm64", + "386": "X86", + "aarch64": "ARM64", } if arch, ok := archMapper[arch]; ok { return arch