Repository: nektos/act (language: go)

Issue:
`RUNNER_ARCH` and `-self-hosted`
### 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_


Discussion / hints:
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
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.

Fix patch:
diff --git a/pkg/container/host_environment.go b/pkg/container/host_environment.go
index 0103ebdb2f0..4e9efd18b52 100644
--- a/pkg/container/host_environment.go
+++ b/pkg/container/host_environment.go
@@ -423,6 +423,7 @@ func (*HostEnvironment) JoinPathVariable(paths ...string) string {
 // https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context
 func goArchToActionArch(arch string) string {
 	archMapper := map[string]string{
+		"amd64":   "X64",
 		"x86_64":  "X64",
 		"386":     "X86",
 		"aarch64": "ARM64",


Test patch: