[GH-ISSUE #1852] -P Flag Not Working #900

Closed
opened 2026-03-01 21:47:15 +03:00 by kerem · 2 comments
Owner

Originally created by @dkolb on GitHub (Jun 9, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1852

Bug report info

act --bug-report
act version:            0.2.46
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 10
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        /var/run/docker.sock
        $HOME/.docker/run/docker.sock
Config files:
        /Users/david.kolb/.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
                -P CAI-Enterprise=catthehacker/ubuntu:act-20.04
                --container-architecture linux/amd64
Build info:
        Go version:            go1.20.4
        Module path:           command-line-arguments
        Main version:
        Main path:
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -X main.version=0.2.46
                CGO_ENABLED:          1
                CGO_CFLAGS:
                CGO_CPPFLAGS:
                CGO_CXXFLAGS:
                CGO_LDFLAGS:
                GOARCH:               arm64
                GOOS:                 darwin
Docker Engine:
        Engine version:        23.0.5
        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:                5
        OS memory:             7851 MB
        Security options:
                name=seccomp,profile=builtin
                name=cgroupns

Command used with act

act -v -P CAI-Enterprise=catthehacker/ubuntu:act-20.04 --container-architecture linux/amd64

Describe issue

Platform is reported as unsupported even when -P flag is provided for a custom runner via command line or ~/.actrc

No response

Workflow content

name: Act Test

on:
  push:
    branches: ["main"]
jobs:
  test-job:
    name: Test Job
    runs-on: CAI-Enterprise
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - shell: bash
        run: echo Hello world.

Relevant log output

time="2023-06-09T09:38:47-04:00" level=debug msg="Loading environment from /Users/david.kolb/code/MAN-Actions/run-in-codebuild/.env"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading action inputs from /Users/david.kolb/code/MAN-Actions/run-in-codebuild/.input"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading secrets from /Users/david.kolb/code/MAN-Actions/run-in-codebuild/.secrets"
time="2023-06-09T09:38:47-04:00" level=debug msg="Conditional GET for notices etag=84bae7e3-76bf-4818-aa59-69e3a17dc882"
time="2023-06-09T09:38:47-04:00" level=debug msg="Evaluated matrix inclusions: map[]"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading workflows from '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading workflows recursively"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found workflow 'act_test.yaml' in '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/act_test.yaml'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found workflow 'release.yml' in '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/release.yml'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found workflow 'test.yml' in '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/test.yml'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Reading workflow '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/act_test.yaml'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Reading workflow '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/release.yml'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Reading workflow '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/test.yml'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Preparing plan with all jobs"
time="2023-06-09T09:38:47-04:00" level=debug msg="Using the only detected workflow event: push"
time="2023-06-09T09:38:47-04:00" level=debug msg="Planning jobs for event: push"
time="2023-06-09T09:38:47-04:00" level=debug msg="gc: 2023-06-09 09:38:47.852672 -0400 EDT m=+0.006062292" module=artifactcache
time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'"
time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'"
time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'"
time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'"
time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'"
time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
[Act Test/Test Job                                                           ] [DEBUG] evaluating expression 'success()'
[Act Test/Test Job                                                           ] [DEBUG] expression 'success()' evaluated to 'true'
[Act Test/Test Job                                                           ] 🚧  Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...`
[Release/release                                                             ] [DEBUG] evaluating expression 'success()'
[Test and Documentation Update/Test -- Terraform plans against Standard Tools] [DEBUG] evaluating expression 'success()'
[Release/release                                                             ] [DEBUG] expression 'success()' evaluated to 'true'
[Release/release                                                             ] 🚧  Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...`
[Test and Documentation Update/Test -- Terraform plans against Standard Tools] [DEBUG] expression 'success()' evaluated to 'true'
[Test and Documentation Update/Test -- prep_tfvars.py                        ] [DEBUG] evaluating expression 'success()'
[Test and Documentation Update/Test -- Terraform plans against Standard Tools] 🚧  Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...`
[Test and Documentation Update/Test -- prep_tfvars.py                        ] [DEBUG] expression 'success()' evaluated to 'true'
[Test and Documentation Update/Validate Readme                               ] [DEBUG] evaluating expression 'success()'
[Test and Documentation Update/Test -- prep_tfvars.py                        ] 🚧  Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...`
[Test and Documentation Update/Validate Readme                               ] [DEBUG] expression 'success()' evaluated to 'true'
[Test and Documentation Update/Validate Readme                               ] 🚧  Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...`
time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'"
time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'"
time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev"
time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1"
[Test and Documentation Update/test-action                                   ] [DEBUG] evaluating expression 'success()'
[Test and Documentation Update/test-action                                   ] [DEBUG] expression 'success()' evaluated to 'false'
[Test and Documentation Update/test-action                                   ] [DEBUG] Skipping job 'test-action' due to 'success()'
time="2023-06-09T09:38:48-04:00" level=debug msg="Saving notices etag=84bae7e3-76bf-4818-aa59-69e3a17dc882"
time="2023-06-09T09:38:48-04:00" level=debug msg="No new notices"

Additional information

No response

Originally created by @dkolb on GitHub (Jun 9, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1852 ### Bug report info ```plain text act --bug-report act version: 0.2.46 GOOS: darwin GOARCH: arm64 NumCPU: 10 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock $HOME/.docker/run/docker.sock Config files: /Users/david.kolb/.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 -P CAI-Enterprise=catthehacker/ubuntu:act-20.04 --container-architecture linux/amd64 Build info: Go version: go1.20.4 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -X main.version=0.2.46 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: arm64 GOOS: darwin Docker Engine: Engine version: 23.0.5 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: 5 OS memory: 7851 MB Security options: name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh act -v -P CAI-Enterprise=catthehacker/ubuntu:act-20.04 --container-architecture linux/amd64 ``` ### Describe issue Platform is reported as unsupported even when -P flag is provided for a custom runner via command line or ~/.actrc ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Act Test on: push: branches: ["main"] jobs: test-job: name: Test Job runs-on: CAI-Enterprise steps: - name: Checkout uses: actions/checkout@v3 - shell: bash run: echo Hello world. ``` ### Relevant log output ```sh time="2023-06-09T09:38:47-04:00" level=debug msg="Loading environment from /Users/david.kolb/code/MAN-Actions/run-in-codebuild/.env" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading action inputs from /Users/david.kolb/code/MAN-Actions/run-in-codebuild/.input" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading secrets from /Users/david.kolb/code/MAN-Actions/run-in-codebuild/.secrets" time="2023-06-09T09:38:47-04:00" level=debug msg="Conditional GET for notices etag=84bae7e3-76bf-4818-aa59-69e3a17dc882" time="2023-06-09T09:38:47-04:00" level=debug msg="Evaluated matrix inclusions: map[]" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading workflows from '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows'" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading workflows recursively" time="2023-06-09T09:38:47-04:00" level=debug msg="Found workflow 'act_test.yaml' in '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/act_test.yaml'" time="2023-06-09T09:38:47-04:00" level=debug msg="Found workflow 'release.yml' in '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/release.yml'" time="2023-06-09T09:38:47-04:00" level=debug msg="Found workflow 'test.yml' in '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/test.yml'" time="2023-06-09T09:38:47-04:00" level=debug msg="Reading workflow '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/act_test.yaml'" time="2023-06-09T09:38:47-04:00" level=debug msg="Reading workflow '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/release.yml'" time="2023-06-09T09:38:47-04:00" level=debug msg="Reading workflow '/Users/david.kolb/code/MAN-Actions/run-in-codebuild/.github/workflows/test.yml'" time="2023-06-09T09:38:47-04:00" level=debug msg="Preparing plan with all jobs" time="2023-06-09T09:38:47-04:00" level=debug msg="Using the only detected workflow event: push" time="2023-06-09T09:38:47-04:00" level=debug msg="Planning jobs for event: push" time="2023-06-09T09:38:47-04:00" level=debug msg="gc: 2023-06-09 09:38:47.852672 -0400 EDT m=+0.006062292" module=artifactcache time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'" time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'" time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'" time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'" time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'" time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" [Act Test/Test Job ] [DEBUG] evaluating expression 'success()' [Act Test/Test Job ] [DEBUG] expression 'success()' evaluated to 'true' [Act Test/Test Job ] 🚧 Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...` [Release/release ] [DEBUG] evaluating expression 'success()' [Test and Documentation Update/Test -- Terraform plans against Standard Tools] [DEBUG] evaluating expression 'success()' [Release/release ] [DEBUG] expression 'success()' evaluated to 'true' [Release/release ] 🚧 Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...` [Test and Documentation Update/Test -- Terraform plans against Standard Tools] [DEBUG] expression 'success()' evaluated to 'true' [Test and Documentation Update/Test -- prep_tfvars.py ] [DEBUG] evaluating expression 'success()' [Test and Documentation Update/Test -- Terraform plans against Standard Tools] 🚧 Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...` [Test and Documentation Update/Test -- prep_tfvars.py ] [DEBUG] expression 'success()' evaluated to 'true' [Test and Documentation Update/Validate Readme ] [DEBUG] evaluating expression 'success()' [Test and Documentation Update/Test -- prep_tfvars.py ] 🚧 Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...` [Test and Documentation Update/Validate Readme ] [DEBUG] expression 'success()' evaluated to 'true' [Test and Documentation Update/Validate Readme ] 🚧 Skipping unsupported platform -- Try running with `-P CAI-Enterprise=...` time="2023-06-09T09:38:47-04:00" level=debug msg="Final matrix after applying user inclusions '[map[]]'" time="2023-06-09T09:38:47-04:00" level=debug msg="Loading revision from git directory" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" time="2023-06-09T09:38:47-04:00" level=debug msg="HEAD points to '19851c5f2e095e40abb8ef5c298fcba75a66e8c1'" time="2023-06-09T09:38:47-04:00" level=debug msg="using github ref: refs/heads/dev" time="2023-06-09T09:38:47-04:00" level=debug msg="Found revision: 19851c5f2e095e40abb8ef5c298fcba75a66e8c1" [Test and Documentation Update/test-action ] [DEBUG] evaluating expression 'success()' [Test and Documentation Update/test-action ] [DEBUG] expression 'success()' evaluated to 'false' [Test and Documentation Update/test-action ] [DEBUG] Skipping job 'test-action' due to 'success()' time="2023-06-09T09:38:48-04:00" level=debug msg="Saving notices etag=84bae7e3-76bf-4818-aa59-69e3a17dc882" time="2023-06-09T09:38:48-04:00" level=debug msg="No new notices" ``` ### Additional information _No response_
kerem 2026-03-01 21:47:15 +03:00
Author
Owner

@ChristopherHX commented on GitHub (Jun 9, 2023):

You found a case handling bug…

Please use lowercase for the -P flag in the meantime.

-P cai-enterprise=catthehacker/ubuntu:act-20.04

Based on the source code, you don't have to alter your workflow file.

<!-- gh-comment-id:1584693868 --> @ChristopherHX commented on GitHub (Jun 9, 2023): You found a case handling bug… Please use lowercase for the `-P` flag in the meantime. ``` -P cai-enterprise=catthehacker/ubuntu:act-20.04 ``` Based on the source code, you don't have to alter your workflow file.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 7, 2023):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1843914514 --> @github-actions[bot] commented on GitHub (Dec 7, 2023): Issue is stale and will be closed in 14 days unless there is new activity
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#900
No description provided.