[GH-ISSUE #1509] RUNNER_OS should return macOS instead of darwin and wrong RUNNER_ARCH on MacOS M1 #769

Closed
opened 2026-03-01 21:46:13 +03:00 by kerem · 3 comments
Owner

Originally created by @x-yurii-uvarov on GitHub (Dec 14, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1509

Bug report info

act --bug-report                                    
act version:            0.2.34
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
	/var/run/docker.sock
	/Users/yuriiuvarov/.docker/run/docker.sock
Config files:           
	/Users/yuriiuvarov/.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
	.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.19.3
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-compiler:            gc
		-ldflags:             -X main.version=0.2.34
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               amd64
		GOOS:                 darwin
		GOAMD64:              v1
Docker Engine:
	Engine version:        20.10.21
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         cgroupfs
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Docker Desktop
	OS type:               linux
	OS version:            
	OS arch:               aarch64
	OS kernel:             5.15.49-linuxkit
	OS CPU:                4
	OS memory:             3933 MB
	Security options:
		name=seccomp,profile=default
		name=cgroupns

Command used with act

act -j build --platform macos-latest=-self-hosted

Describe issue

Some Github actions depend on the RUNNER_OS and expect one of the defined values according to the https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables.

The operating system of the runner executing the job. Possible values are Linux, Windows, or macOS

For example, flutter-action uses RUNNER_OS to build a link to the flutter binary.

expected result: macOS,
actual result: darwin

Also, RUNNER_ARCH should be arm64(or x64 using rosetta at least) but it provides amd64, which is definitely wrong.

No response

Workflow content

name: Linter & Tests

on:
  push:
    branches: [ main, redesign-master ]
  pull_request:
    branches: [ main, redesign-master ]

jobs:
  build:
    runs-on: macos-latest
    env:
      REPO_DIR: ${{ github.workspace }}
    steps:
      - uses: actions/checkout@v3
      - name: 'Test os'
        run: echo $RUNNER_OS
      - name: 'Set Flutter 3.3.9'
        uses: subosito/flutter-action@v2
        with:
          architecture: arm64
          flutter-version: 3.3.9

Relevant log output

This exceeds the GitHub character limit, please find it here:
https://drive.google.com/file/d/1UYD4cZqcdBm2jMyOISvDMpJ6XJ44LGZq/view?usp=sharing

Additional information

uname -a
Darwin Yuriis-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64
Originally created by @x-yurii-uvarov on GitHub (Dec 14, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1509 ### Bug report info ```plain text act --bug-report act version: 0.2.34 GOOS: darwin GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock /Users/yuriiuvarov/.docker/run/docker.sock Config files: /Users/yuriiuvarov/.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 .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.19.3 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.34 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 20.10.21 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: aarch64 OS kernel: 5.15.49-linuxkit OS CPU: 4 OS memory: 3933 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act -j build --platform macos-latest=-self-hosted ``` ### Describe issue Some Github actions depend on the `RUNNER_OS` and expect one of the defined values according to the https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables. > The operating system of the runner executing the job. Possible values are `Linux`, `Windows`, or `macOS` For example,[ flutter-action](https://github.com/subosito/flutter-action) [uses](https://github.com/subosito/flutter-action/blob/dbf1fa04f4d2e52c33185153d06cdb5443aa189d/setup.sh#L12-L14) `RUNNER_OS` to build a link to the flutter binary. expected result: macOS, actual result: darwin Also, RUNNER_ARCH should be arm64(or x64 using rosetta at least) but it provides amd64, which is definitely wrong. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Linter & Tests on: push: branches: [ main, redesign-master ] pull_request: branches: [ main, redesign-master ] jobs: build: runs-on: macos-latest env: REPO_DIR: ${{ github.workspace }} steps: - uses: actions/checkout@v3 - name: 'Test os' run: echo $RUNNER_OS - name: 'Set Flutter 3.3.9' uses: subosito/flutter-action@v2 with: architecture: arm64 flutter-version: 3.3.9 ``` ### Relevant log output ```sh This exceeds the GitHub character limit, please find it here: https://drive.google.com/file/d/1UYD4cZqcdBm2jMyOISvDMpJ6XJ44LGZq/view?usp=sharing ``` ### Additional information ``` uname -a Darwin Yuriis-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64 ```
kerem 2026-03-01 21:46:13 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@ChristopherHX commented on GitHub (Dec 14, 2022):

@x-yurii-uvarov Could you please check if the arm64 version of act https://github.com/nektos/act/releases/download/v0.2.34/act_Darwin_arm64.tar.gz has the correct RUNNER_ARCH ?

You are right, the RUNNER_OS needs a remapping for macOS.

<!-- gh-comment-id:1351993928 --> @ChristopherHX commented on GitHub (Dec 14, 2022): @x-yurii-uvarov Could you please check if the arm64 version of act https://github.com/nektos/act/releases/download/v0.2.34/act_Darwin_arm64.tar.gz has the correct RUNNER_ARCH ? You are right, the RUNNER_OS needs a remapping for macOS.
Author
Owner

@ChristopherHX commented on GitHub (Dec 14, 2022):

FYI Possible values for RUNNER_OS of act are also freebsd, openbsd, plan9, dragonfly, solaris and android.

If you run RUNNER_OS=macOS act ... you have the correct RUNNER_OS without a patch

<!-- gh-comment-id:1352046486 --> @ChristopherHX commented on GitHub (Dec 14, 2022): FYI Possible values for `RUNNER_OS` of act are also `freebsd`, `openbsd`, `plan9`, `dragonfly`, `solaris` and `android`. If you run `RUNNER_OS=macOS act ...` you have the correct RUNNER_OS without a patch
Author
Owner

@x-yurii-uvarov commented on GitHub (Dec 15, 2022):

I have uninstalled the brew version of the act and tried yours, and RUNNER_ARCH changed from amd64 to arm64.
Also, RUNNER_OS=macOS act ... helped to change RUNNER_OS, and I can use it as a workaround for now.

Thank you @ChristopherHX! Both of your suggestions work!

<!-- gh-comment-id:1352883458 --> @x-yurii-uvarov commented on GitHub (Dec 15, 2022): I have uninstalled the brew version of the `act` and tried yours, and RUNNER_ARCH changed from amd64 to arm64. Also, `RUNNER_OS=macOS act ...` helped to change RUNNER_OS, and I can use it as a workaround for now. Thank you @ChristopherHX! Both of your suggestions work!
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#769
No description provided.