nektos / act

Run your GitHub Actions locally 🚀

Home Page:https://nektosact.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The current runner (...) was detected as self-hosted

lpender opened this issue · comments

Bug report info

act version:            0.2.60
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
        $HOME/.docker/run/docker.sock
Config files:           
        /Users/lpender/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.22.0
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -X main.version=0.2.60
                DefaultGODEBUG:       httplaxcontentlength=1,httpmuxgo121=1,panicnil=1,tls10server=1,tlsrsakex=1,tlsunsafeekm=1
                CGO_ENABLED:          1
                CGO_CFLAGS:           
                CGO_CPPFLAGS:         
                CGO_CXXFLAGS:         
                CGO_LDFLAGS:          
                GOARCH:               arm64
                GOOS:                 darwin
Docker Engine:
        Engine version:        25.0.3
        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:             6.6.16-linuxkit
        OS CPU:                8
        OS memory:             7941 MB
        Security options:
                name=seccomp,profile=unconfined
                name=cgroupns


### Command used with act

```sh
act

Describe issue

Reports, erroneously that the current runner "was detected as self-hosted".

Using runs-on: ubuntu-latest produces same output.

However, https://github.com/actions/runner-images indicates ubuntu-latest or ubuntu-22.04 are GH supported runner images.

Link to GitHub repository

No response

Workflow content

name: "Ruby on Rails CI"
on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install Ruby and gems
        uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
        with:
          bundler-cache: true
      - name: Run tests
        run: bin/rake

Relevant log output

::error::The current runner (ubuntu-22.04-arm64) was detected as self-hosted because the platform does not match a GitHub-hosted runner image (or that image is deprecated and no longer supported).%0AIn such a case, you should install Ruby in the $RUNNER_TOOL_CACHE yourself, for example using https://github.com/rbenv/ruby-build%0AYou can take inspiration from this workflow for more details: https://github.com/ruby/ruby-builder/blob/master/.github/workflows/build.yml%0A$ ruby-build 3.2.2 /opt/hostedtoolcache/Ruby/3.2.2/arm64%0AOnce that completes successfully, mark it as complete with:%0A$ touch /opt/hostedtoolcache/Ruby/3.2.2/arm64.complete%0AIt is your responsibility to ensure installing Ruby like that is not done in parallel.%0A

Additional information

No response

Appending --container-architecture linux/amd64 fixes this issue. Thanks!

@lpender where should I append the flag above?