fix: Update ARCH environment variable used in runners/actions (#1818)

This commit is contained in:
ab-pkandhari 2023-05-23 07:26:47 -05:00 committed by GitHub
parent 16c574cd26
commit 11dd2ac745
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -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