runner.arch returns lowercase 'arm64' instead of 'ARM64' when using -self-hosted on ARM64 hosts
Bug report info
act version: 0.2.89
GOOS: darwin
GOARCH: arm64
NumCPU: 18
Docker host: unix:///var/folders/lb/xscfg2ss0jj8gwmxp7zl8s000000gn/T/podman/podman-machine-default-api.sock
Sockets found:
/var/run/docker.sock(broken)
Config files:
/Users/pealmeid/Library/Application Support/act/actrc:
-P ubuntu-latest=catthehacker/ubuntu:act-latest
-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
Go version: go1.26.3
Module path: command-line-arguments
Main version:
Main path:
Main checksum:
Build settings:
-buildmode: exe
-compiler: gc
-ldflags: -X main.version=0.2.89
DefaultGODEBUG: cryptocustomrand=1,tlssecpmlkem=0,urlstrictcolons=0
CGO_ENABLED: 1
CGO_CFLAGS:
CGO_CPPFLAGS:
CGO_CXXFLAGS:
CGO_LDFLAGS:
GOARCH: arm64
GOOS: darwin
GOARM64: v8.0
Docker Engine:
Engine version: 5.8.6
Engine runtime: crun
Cgroup version: 2
Cgroup driver: systemd
Storage driver: overlay
Registry URI:
OS: fedora
OS type: linux
OS version: 44
OS arch: arm64
OS kernel: 7.1.4-200.fc44.aarch64
OS CPU: 9
OS memory: 7904 MB
Security options:
name=seccomp,profile=default
name=rootless
name=selinux
Command used with act
act push -P ubuntu-latest=-self-hosted
Describe issue
When running act with -P ubuntu-latest=-self-hosted on an ARM64 host (macOS or Linux), RUNNER_ARCH and runner.arch are set to arm64 (lowercase) instead of ARM64.
The GitHub Actions spec (https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context) defines the only valid values for runner.arch as X86, X64, ARM, ARM64 - all uppercase. Receiving arm64 breaks workflows that compare against the spec values, e.g. if: runner.arch == 'ARM64'.
Root cause: goArchToActionArch() in pkg/container/host_environment.go maps "aarch64" -> "ARM64" but is missing "arm64", which is what Go's runtime.GOARCH returns on ARM64 hosts. The value falls through the mapper and is returned verbatim in lowercase. The Docker container path (docker_run.go) already handles "arm64" correctly.
Expected: RUNNER_ARCH=ARM64
Actual: RUNNER_ARCH=arm64
Link to GitHub repository
No response
Workflow content
name: Check Runner Arch
on: [push]
jobs:
check-arch:
runs-on: ubuntu-latest
steps:
- name: Print RUNNER_ARCH env var
run: echo "RUNNER_ARCH=$RUNNER_ARCH"
- name: Print runner.arch context
run: echo "runner.arch=${{ runner.arch }}"
Relevant log output
# Running: act push -P ubuntu-latest=-self-hosted
RUNNER_ARCH=arm64
runner.arch=arm64
# Expected: ARM64
Additional information
No response
Source: nektos/act