[GH-ISSUE #1470] Act is ignoring "using" #755

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

Originally created by @yatsenkolesh on GitHub (Nov 26, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1470

Bug report info

act --bug-report
act version:            0.2.33
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
        /Users/aleksey/.docker/run/docker.sock
Config files:           
        /Users/aleksey/.actrc:
                -P ubuntu-latest=nektos/act-environments-ubuntu:18.04-full
                -P -P ubuntu-22.04=nektos/act-environments-ubuntu:18.04-lite
                ubuntu-20.04=nektos/act-environments-ubuntu:18.04-lite
                -P ubuntu-18.04=catthehacker/ubuntu:full-latest
Build info:
        Go version:            go1.19.2
        Module path:           command-line-arguments
        Main version:          
        Main path:             
        Main checksum:         
        Build settings:
                -compiler:            gc
                -ldflags:             -X main.version=0.2.33
                CGO_ENABLED:          1
                CGO_CFLAGS:           
                CGO_CPPFLAGS:         
                CGO_CXXFLAGS:         
                CGO_LDFLAGS:          
                GOARCH:               amd64
                GOOS:                 darwin
                GOAMD64:              v1
Docker Engine:
        Engine version:        20.10.10
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:            
        OS arch:               x86_64
        OS kernel:             5.10.47-linuxkit
        OS CPU:                5
        OS memory:             7960 MB
        Security options:
                name=seccomp,profile=default

Command used with act

act -j Run-main-unit-tests

Describe issue

Hi guys. When I'm running the tests I got the following issue with shivammathur/setup-php@v2: aleksey@hello pdffiller % act -j Run-main-unit-tests
[Main Unit tests/Run-main-unit-tests] 🚀 Start image=nektos/act-environments-ubuntu:18.04-full
[Main Unit tests/Run-main-unit-tests] 🐳 docker pull image=nektos/act-environments-ubuntu:18.04-full platform= username= forcePull=false
[Main Unit tests/Run-main-unit-tests] 🐳 docker create image=nektos/act-environments-ubuntu:18.04-full platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Main Unit tests/Run-main-unit-tests] 🐳 docker run image=nektos/act-environments-ubuntu:18.04-full platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Main Unit tests/Run-main-unit-tests] ☁ git clone 'https://github.com/shivammathur/setup-php' # ref=v2
[Main Unit tests/Run-main-unit-tests] ☁ git clone 'https://github.com/actions/cache' # ref=v1
[Main Unit tests/Run-main-unit-tests] Run Main Setup PHP
[Main Unit tests/Run-main-unit-tests] 🐳 docker cp src=/Users/aleksey/.cache/act/shivammathur-setup-php@v2/ dst=/var/run/act/actions/shivammathur-setup-php@v2/
[Main Unit tests/Run-main-unit-tests] 🐳 docker exec cmd=[node /var/run/act/actions/shivammathur-setup-php@v2/dist/index.js] user= workdir=
| /run/act/actions/shivammathur-setup-php@v2/dist/index.js:632

I'm using the base image to run the test (nektos/act-environments-ubuntu:18.04-full). Looks like this issue caused by ignoring the rule "using" in GitHub action - https://github.com/shivammathur/setup-php/blob/master/action.yml#L32
So "??" is not supported in js in the act-environments-ubuntu:18.04-full image.

No response

Workflow content

name: Main Unit tests

on:
  pull_request:
    branches:
      - '*'

jobs:
  Run-main-unit-tests:
    runs-on: ubuntu-latest
    steps:
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '7.4'
          coverage: none

      - name: Checkout
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
.....

Relevant log output

- (a lot of sensetive data, sorry)

Additional information

No response

Originally created by @yatsenkolesh on GitHub (Nov 26, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1470 ### Bug report info ```plain text act --bug-report act version: 0.2.33 GOOS: darwin GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock /Users/aleksey/.docker/run/docker.sock Config files: /Users/aleksey/.actrc: -P ubuntu-latest=nektos/act-environments-ubuntu:18.04-full -P -P ubuntu-22.04=nektos/act-environments-ubuntu:18.04-lite ubuntu-20.04=nektos/act-environments-ubuntu:18.04-lite -P ubuntu-18.04=catthehacker/ubuntu:full-latest Build info: Go version: go1.19.2 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.33 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 20.10.10 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.10.47-linuxkit OS CPU: 5 OS memory: 7960 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act -j Run-main-unit-tests ``` ### Describe issue Hi guys. When I'm running the tests I got the following issue with shivammathur/setup-php@v2: aleksey@hello pdffiller % act -j Run-main-unit-tests [Main Unit tests/Run-main-unit-tests] 🚀 Start image=nektos/act-environments-ubuntu:18.04-full [Main Unit tests/Run-main-unit-tests] 🐳 docker pull image=nektos/act-environments-ubuntu:18.04-full platform= username= forcePull=false [Main Unit tests/Run-main-unit-tests] 🐳 docker create image=nektos/act-environments-ubuntu:18.04-full platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Main Unit tests/Run-main-unit-tests] 🐳 docker run image=nektos/act-environments-ubuntu:18.04-full platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Main Unit tests/Run-main-unit-tests] ☁ git clone 'https://github.com/shivammathur/setup-php' # ref=v2 [Main Unit tests/Run-main-unit-tests] ☁ git clone 'https://github.com/actions/cache' # ref=v1 [Main Unit tests/Run-main-unit-tests] ⭐ Run Main Setup PHP [Main Unit tests/Run-main-unit-tests] 🐳 docker cp src=/Users/aleksey/.cache/act/shivammathur-setup-php@v2/ dst=/var/run/act/actions/shivammathur-setup-php@v2/ [Main Unit tests/Run-main-unit-tests] 🐳 docker exec cmd=[node /var/run/act/actions/shivammathur-setup-php@v2/dist/index.js] user= workdir= | /run/act/actions/shivammathur-setup-php@v2/dist/index.js:632 I'm using the base image to run the test (nektos/act-environments-ubuntu:18.04-full). Looks like this issue caused by ignoring the rule "using" in GitHub action - https://github.com/shivammathur/setup-php/blob/master/action.yml#L32 So "??" is not supported in js in the act-environments-ubuntu:18.04-full image. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Main Unit tests on: pull_request: branches: - '*' jobs: Run-main-unit-tests: runs-on: ubuntu-latest steps: - name: Setup PHP uses: shivammathur/setup-php@v2 with: php-version: '7.4' coverage: none - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 ..... ``` ### Relevant log output ```sh - (a lot of sensetive data, sorry) ``` ### Additional information _No response_
kerem 2026-03-01 21:46:06 +03:00
Author
Owner

@20k-ultra commented on GitHub (Nov 30, 2022):

I don't see any error in the logs you provided. What is the problem ?

When I run your workflow (I remove the checkout step), the job succeeds.

<!-- gh-comment-id:1332729115 --> @20k-ultra commented on GitHub (Nov 30, 2022): I don't see any error in the logs you provided. What is the problem ? When I run your workflow (I remove the checkout step), the job succeeds.
Author
Owner

@ChristopherHX commented on GitHub (Nov 30, 2022):

What is the problem ?

act uses node from PATH to run both using: node12 and using: node16. In this case node is node in version12 with it's old pre node 16 syntax.

However this is intentional and using such an outdated docker image is not recommend.

<!-- gh-comment-id:1332734015 --> @ChristopherHX commented on GitHub (Nov 30, 2022): > What is the problem ? act uses `node` from `PATH` to run both `using: node12` and `using: node16`. In this case `node` is node in version12 with it's old pre node 16 syntax. However this is intentional and using such an outdated docker image is not recommend.
Author
Owner

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

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

<!-- gh-comment-id:1374283035 --> @github-actions[bot] commented on GitHub (Jan 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#755
No description provided.