[GH-ISSUE #2579] RUNNER_ARCH and -self-hosted #1175

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

Originally created by @derrik-fleming on GitHub (Dec 18, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2579

Bug report info

act --bug-report
act version:            0.2.68
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
Config files:
        /Users/derrik.fleming/Library/Application Support/act/actrc:
                -P ubuntu-latest=node:16-buster-slim
                -P ubuntu-22.04=node:16-bullseye-slim
                -P ubuntu-20.04=node:16-buster-slim
                -P ubuntu-18.04=node:16-buster-slim
Build info:
        Go version:            go1.23.3
        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
                DefaultGODEBUG:       asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1
                CGO_ENABLED:          1
                GOARCH:               amd64
                GOOS:                 darwin
                GOAMD64:              v1
Docker Engine:
        Engine version:        27.3.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:               x86_64
        OS kernel:             6.10.12-orbstack-00282-gd1783374c25e
        OS CPU:                16
        OS memory:             5981 MB
        Security options:
                name=seccomp,profile=builtin
                name=cgroupns

Command used with act

act -P macos-latest=-self-hosted --container-architecture=darwin/x86_64

Describe issue

Seems like the --container-architecture flag has no effect with -self-hosted.

I understand the name doesn't really make sense given that it's not running in a container when using the -self-hosted flag, so I'm not surprised that it doesn't work in the same way it would when running in a container. But I am making use of an Action in my Workflow that depends on the architecture, and when RUNNER_ARCH is set to the default amd64 the Action fails.

I'm looking for a way to be able set RUNNER_ARCH when using -self-hosted. I've tried setting it via --env and on my system, in both cases it seems like it gets overridden by Act.

No response

Workflow content

name: Build, analyze, format, test, check coverage

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@v4

      - uses: Atsumi3/actions-setup-fvm@0.0.3

      - uses:  kuhnroyal/flutter-fvm-config-action@v2
        id: fvm-config-action

      - uses: subosito/flutter-action@v2
        with:
          flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
          channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}

      - uses: bluefireteam/melos-action@v3

      - name: Install dependencies
        run: melos get

      - name: Activate coverde
        run: dart pub global activate coverde

      - name: Build
        run: melos build

      - name: Format
        run: melos format:ci

      - name: Analyze
        run: melos analyze

      - name: Test
        run: melos test

      - name: Coverage
        run: melos coverage

      - name: Check coverage
        run: melos check_coverage

      - name: Build iOS and Android apps
        run: melos build_apps

Relevant log output

[Build, analyze, format, test, check coverage/build] ⭐ Run Main Set action inputs
| Unable to determine Flutter version for channel: stable version: 3.24.3 architecture: amd64
[Build, analyze, format, test, check coverage/build]   ❌  Failure - Main Set action inputs
[Build, analyze, format, test, check coverage/build] exit status 1
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: PUB-CACHE-KEY=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: PUB-CACHE-PATH=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: CHANNEL=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: VERSION=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: ARCHITECTURE=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: CACHE-KEY=
[Build, analyze, format, test, check coverage/build]   ⚙  ::set-output:: CACHE-PATH=
[Build, analyze, format, test, check coverage/build]   ❌  Failure - Main subosito/flutter-action@v2
[Build, analyze, format, test, check coverage/build] exit status 1
[Build, analyze, format, test, check coverage/build]   ❌  Failure - Main Atsumi3/actions-setup-fvm@0.0.3
[Build, analyze, format, test, check coverage/build] exit status 1

Additional information

No response

Originally created by @derrik-fleming on GitHub (Dec 18, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2579 ### Bug report info ```plain text act --bug-report act version: 0.2.68 GOOS: darwin GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /Users/derrik.fleming/Library/Application Support/act/actrc: -P ubuntu-latest=node:16-buster-slim -P ubuntu-22.04=node:16-bullseye-slim -P ubuntu-20.04=node:16-buster-slim -P ubuntu-18.04=node:16-buster-slim Build info: Go version: go1.23.3 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 DefaultGODEBUG: asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1 CGO_ENABLED: 1 GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 27.3.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: x86_64 OS kernel: 6.10.12-orbstack-00282-gd1783374c25e OS CPU: 16 OS memory: 5981 MB Security options: name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh act -P macos-latest=-self-hosted --container-architecture=darwin/x86_64 ``` ### Describe issue Seems like the `--container-architecture` flag has no effect with `-self-hosted`. I understand the name doesn't really make sense given that it's not running in a container when using the `-self-hosted` flag, so I'm not surprised that it doesn't work in the same way it would when running in a container. But I am making use of an Action in my Workflow that depends on the architecture, and when `RUNNER_ARCH` is set to the default `amd64` the Action fails. I'm looking for a way to be able set `RUNNER_ARCH` when using `-self-hosted`. I've tried setting it via `--env` and on my system, in both cases it seems like it gets overridden by Act. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Build, analyze, format, test, check coverage on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: build: runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: Atsumi3/actions-setup-fvm@0.0.3 - uses: kuhnroyal/flutter-fvm-config-action@v2 id: fvm-config-action - uses: subosito/flutter-action@v2 with: flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} - uses: bluefireteam/melos-action@v3 - name: Install dependencies run: melos get - name: Activate coverde run: dart pub global activate coverde - name: Build run: melos build - name: Format run: melos format:ci - name: Analyze run: melos analyze - name: Test run: melos test - name: Coverage run: melos coverage - name: Check coverage run: melos check_coverage - name: Build iOS and Android apps run: melos build_apps ``` ### Relevant log output ```sh [Build, analyze, format, test, check coverage/build] ⭐ Run Main Set action inputs | Unable to determine Flutter version for channel: stable version: 3.24.3 architecture: amd64 [Build, analyze, format, test, check coverage/build] ❌ Failure - Main Set action inputs [Build, analyze, format, test, check coverage/build] exit status 1 [Build, analyze, format, test, check coverage/build] ⚙ ::set-output:: PUB-CACHE-KEY= [Build, analyze, format, test, check coverage/build] ⚙ ::set-output:: PUB-CACHE-PATH= [Build, analyze, format, test, check coverage/build] ⚙ ::set-output:: CHANNEL= [Build, analyze, format, test, check coverage/build] ⚙ ::set-output:: VERSION= [Build, analyze, format, test, check coverage/build] ⚙ ::set-output:: ARCHITECTURE= [Build, analyze, format, test, check coverage/build] ⚙ ::set-output:: CACHE-KEY= [Build, analyze, format, test, check coverage/build] ⚙ ::set-output:: CACHE-PATH= [Build, analyze, format, test, check coverage/build] ❌ Failure - Main subosito/flutter-action@v2 [Build, analyze, format, test, check coverage/build] exit status 1 [Build, analyze, format, test, check coverage/build] ❌ Failure - Main Atsumi3/actions-setup-fvm@0.0.3 [Build, analyze, format, test, check coverage/build] exit status 1 ``` ### Additional information _No response_
kerem 2026-03-01 21:49:28 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@ChristopherHX commented on GitHub (Dec 18, 2024):

Make a PR to map amd64 to x64?

Here is the code:

github.com/nektos/act@9c7f103bb3/pkg/container/host_environment.go (L426)

  • get the go sdk
  • make the change and run go build if it works fork this repo and make a Pullrequest
<!-- gh-comment-id:2552440731 --> @ChristopherHX commented on GitHub (Dec 18, 2024): Make a PR to map amd64 to x64? Here is the code: https://github.com/nektos/act/blob/9c7f103bb39f11430f58c1a68d5629a42e6d56a1/pkg/container/host_environment.go#L426 - get the go sdk - make the change and run `go build` if it works fork this repo and make a Pullrequest
Author
Owner

@derrik-fleming commented on GitHub (Dec 18, 2024):

Happy to do so. Is there a case where amd64 is useful and the map you described would be undesirable?

I assumed amd64 was the default for a reason, but it wasn't immediately obvious to me why.

<!-- gh-comment-id:2552453087 --> @derrik-fleming commented on GitHub (Dec 18, 2024): Happy to do so. Is there a case where `amd64` is useful and the map you described would be undesirable? I assumed `amd64` was the default for a reason, but it wasn't immediately obvious to me why.
Author
Owner

@ChristopherHX commented on GitHub (Dec 19, 2024):

Is there a case where amd64 is useful and the map you described would be undesirable?

I don't think such a case exist for act (for my github-act-runner this is a breaking change to document), all actions should expect X64

I assumed amd64 was the default for a reason

github-act-runner had used the raw values for all of them, but as usage in this upstream repo increased for officially supported platforms it has been requested to use the same values if they are documented.

<!-- gh-comment-id:2555741802 --> @ChristopherHX commented on GitHub (Dec 19, 2024): > Is there a case where `amd64` is useful and the map you described would be undesirable? I don't think such a case exist for act (for my `github-act-runner` this is a breaking change to document), all actions should expect `X64` > I assumed `amd64` was the default for a reason `github-act-runner` had used the raw values for all of them, but as usage in this upstream repo increased for officially supported platforms it has been requested to use the same values if they are documented.
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#1175
No description provided.