[GH-ISSUE #2710] Action fails on host runner #1225

Open
opened 2026-03-01 21:49:48 +03:00 by kerem · 0 comments
Owner

Originally created by @chibidev on GitHub (Mar 24, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2710

Bug report info

act version:            0.2.74
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
Config files:           
	/Users/chibidev/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.23.6
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-trimpath:            true
		CGO_ENABLED:          1
		GOARCH:               arm64
		GOOS:                 darwin
		GOARM64:              v8.0
Docker Engine:
	Engine version:        27.5.1
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         cgroupfs
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    OrbStack
	OS type:               linux
	OS version:            
	OS arch:               aarch64
	OS kernel:             6.12.15-orbstack-00304-gd0ddcf70447d
	OS CPU:                16
	OS memory:             16031 MB
	Security options:
		name=seccomp,profile=builtin
		name=cgroupns

Command used with act

act -v -j a -P macos-latest=-self-hosted

Describe issue

When running workflow on an arm64 host machine, actions that observe the runner.arch property may fail.

As far as I can tell this stems from host_environment.go:goArchToActionArch missing an arm64 -> ARM64 mapping (which is correctly present in docker_run.go:RunnerArch).

Happy to spin up a PR, just wanted to ask whether it's OK to merge the two mapping into a common utility to remove duplication and prevent issues in the future.

No response

Workflow content

name: A
on: []

jobs:
  a:
    runs-on: macos-latest
    steps:
      - uses: DeterminateSystems/nix-installer-action@main

Relevant log output

[A/a]   ❗  ::error::ArchOs (arm64-macOS) doesn't map to a supported Nix platform.
| file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88075
|     throw new Error(
|           ^
| 
| Error: Cannot convert ArchOs (arm64-macOS) to a supported Nix platform.
|     at getNixPlatform (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88075:11)
|     at new DetSysAction (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88208:22)
|     at new NixInstallerAction (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88894:5)
|     at main (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:89741:3)
|     at file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:89743:1
|     at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
|     at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26)
|     at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5)
| 
| Node.js v22.14.0

Additional information

No response

Originally created by @chibidev on GitHub (Mar 24, 2025). Original GitHub issue: https://github.com/nektos/act/issues/2710 ### Bug report info ```plain text act version: 0.2.74 GOOS: darwin GOARCH: arm64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /Users/chibidev/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.23.6 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -trimpath: true CGO_ENABLED: 1 GOARCH: arm64 GOOS: darwin GOARM64: v8.0 Docker Engine: Engine version: 27.5.1 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: OrbStack OS type: linux OS version: OS arch: aarch64 OS kernel: 6.12.15-orbstack-00304-gd0ddcf70447d OS CPU: 16 OS memory: 16031 MB Security options: name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh act -v -j a -P macos-latest=-self-hosted ``` ### Describe issue When running workflow on an arm64 host machine, actions that observe the `runner.arch` property may fail. As far as I can tell this stems from [host_environment.go:goArchToActionArch](https://github.com/nektos/act/blob/189f16fb969f91bc2a82471fe47b65f60318b212/pkg/container/host_environment.go#L424C6-L424C24) missing an `arm64 -> ARM64` mapping (which is correctly present in [docker_run.go:RunnerArch](https://github.com/nektos/act/blob/189f16fb969f91bc2a82471fe47b65f60318b212/pkg/container/docker_run.go#L259)). Happy to spin up a PR, just wanted to ask whether it's OK to merge the two mapping into a common utility to remove duplication and prevent issues in the future. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: A on: [] jobs: a: runs-on: macos-latest steps: - uses: DeterminateSystems/nix-installer-action@main ``` ### Relevant log output ```sh [A/a] ❗ ::error::ArchOs (arm64-macOS) doesn't map to a supported Nix platform. | file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88075 | throw new Error( | ^ | | Error: Cannot convert ArchOs (arm64-macOS) to a supported Nix platform. | at getNixPlatform (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88075:11) | at new DetSysAction (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88208:22) | at new NixInstallerAction (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:88894:5) | at main (file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:89741:3) | at file:///Users/chibidev/.cache/act/f87dca30e1e8798c/act/actions/DeterminateSystems-nix-installer-action@main/dist/index.js:89743:1 | at ModuleJob.run (node:internal/modules/esm/module_job:271:25) | at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:578:26) | at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5) | | Node.js v22.14.0 ``` ### Additional information _No response_
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1225
No description provided.