[GH-ISSUE #250] env at the root level not taken into account #172

Closed
opened 2026-03-01 21:40:52 +03:00 by kerem · 11 comments
Owner

Originally created by @sdebruyn on GitHub (May 19, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/250

Github Workflow syntax allows you to use an env block at the root level of the workflow: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#env

It seems like the values I've put here are ignored.

E.g.

name: "tests"
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
env:
  tf_version: "latest"
  go_version: "^1.14.3"
jobs:
  validate:
    name: "Validate"
    runs-on: ubuntu-latest
    steps:
      - name: Setup Go
        uses: actions/setup-go@master
        with:
          go-version: ${{ env.go_version }}

First part of the logs:

[tests/Terratests] 🚀  Start image=nektos/act-environments-ubuntu:18.04
[tests/Terratests]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[tests/Terratests]   🐳  docker cp src=/Users/sam/projects/go/src/github.com/datarootsio/terraform-module-azure-datalake/. dst=/github/workspace
ERRO[0001] Unable to interpolate string '${{ env.go_version }}' - [ReferenceError: 'env' is not defined] 
[tests/Terratests] ⭐  Run Setup Go
Originally created by @sdebruyn on GitHub (May 19, 2020). Original GitHub issue: https://github.com/nektos/act/issues/250 Github Workflow syntax allows you to use an `env` block at the root level of the workflow: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#env It seems like the values I've put here are ignored. E.g. ```yml name: "tests" on: push: branches: - master pull_request: branches: - master env: tf_version: "latest" go_version: "^1.14.3" jobs: validate: name: "Validate" runs-on: ubuntu-latest steps: - name: Setup Go uses: actions/setup-go@master with: go-version: ${{ env.go_version }} ``` First part of the logs: ``` [tests/Terratests] 🚀 Start image=nektos/act-environments-ubuntu:18.04 [tests/Terratests] 🐳 docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [tests/Terratests] 🐳 docker cp src=/Users/sam/projects/go/src/github.com/datarootsio/terraform-module-azure-datalake/. dst=/github/workspace ERRO[0001] Unable to interpolate string '${{ env.go_version }}' - [ReferenceError: 'env' is not defined] [tests/Terratests] ⭐ Run Setup Go ```
Author
Owner

@github-actions[bot] commented on GitHub (Jul 20, 2020):

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

<!-- gh-comment-id:660733689 --> @github-actions[bot] commented on GitHub (Jul 20, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@github-actions[bot] commented on GitHub (Sep 19, 2020):

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

<!-- gh-comment-id:695136702 --> @github-actions[bot] commented on GitHub (Sep 19, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@sdebruyn commented on GitHub (Sep 19, 2020):

Still not implemented AFAIK

<!-- gh-comment-id:695185881 --> @sdebruyn commented on GitHub (Sep 19, 2020): Still not implemented AFAIK
Author
Owner

@github-actions[bot] commented on GitHub (Jan 8, 2021):

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

<!-- gh-comment-id:756474922 --> @github-actions[bot] commented on GitHub (Jan 8, 2021): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@sdebruyn commented on GitHub (Jan 8, 2021):

Still not implemented AFAIK

<!-- gh-comment-id:756599066 --> @sdebruyn commented on GitHub (Jan 8, 2021): Still not implemented AFAIK
Author
Owner

@felpel commented on GitHub (Feb 14, 2021):

I can confirm this is the case. I try to set the version for Node.JS there and it doesn't seem to be taken in account:

# Begin omitted

env:
  node-version: 12.x

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Use Node.js ${{ env.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ env.node-version }}

image

<!-- gh-comment-id:778713506 --> @felpel commented on GitHub (Feb 14, 2021): I can confirm this is the case. I try to set the version for Node.JS there and it doesn't seem to be taken in account: ```yml # Begin omitted env: node-version: 12.x jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Use Node.js ${{ env.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ env.node-version }} ``` ![image](https://user-images.githubusercontent.com/5000004/107867133-083e5180-6e46-11eb-9a08-fc5bc6c3dfda.png)
Author
Owner

@github-actions[bot] commented on GitHub (Mar 17, 2021):

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

<!-- gh-comment-id:800702574 --> @github-actions[bot] commented on GitHub (Mar 17, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@sdebruyn commented on GitHub (Mar 17, 2021):

Stop it please

<!-- gh-comment-id:800864407 --> @sdebruyn commented on GitHub (Mar 17, 2021): Stop it please
Author
Owner

@jsoref commented on GitHub (Apr 4, 2021):

initial description wfm

https://github.com/nektos/act/issues/250#issue-620813326:

jsoref@Joshs-MacBook-Pro 250 % pbpaste > .github/workflows/global-env.yml
jsoref@Joshs-MacBook-Pro 250 % act
WARN[0000] unable to get git repo: unable to find git repo
WARN[0000] unable to get git revision: unable to find git repo
WARN[0000] unable to get git ref: unable to find git repo
[tests/Validate] 🚀  Start image=node:12.20.1-buster-slim
WARN[0000] unable to get git repo: unable to find git repo
WARN[0000] unable to get git revision: unable to find git repo
WARN[0000] unable to get git ref: unable to find git repo
[tests/Validate]   🐳  docker run image=node:12.20.1-buster-slim platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
WARN[0000] unable to get git repo: unable to find git repo
WARN[0000] unable to get git revision: unable to find git repo
WARN[0000] unable to get git ref: unable to find git repo
WARN[0000] unable to get git repo: unable to find git repo
WARN[0000] unable to get git revision: unable to find git repo
WARN[0000] unable to get git ref: unable to find git repo
WARN[0000] unable to get git repo: unable to find git repo
WARN[0000] unable to get git revision: unable to find git repo
WARN[0000] unable to get git ref: unable to find git repo
[tests/Validate] ⭐  Run Setup Go
[tests/Validate]   ☁  git clone 'https://github.com/actions/setup-go' # ref=master
[tests/Validate]   🐳  docker cp src=/Users/jsoref/.cache/act/actions-setup-go@master dst=/actions/
| Setup go stable version spec ^1.14.3
[tests/Validate]   💬  ::debug::isExplicit:
[tests/Validate]   💬  ::debug::explicit? false
[tests/Validate]   💬  ::debug::evaluating 0 versions
[tests/Validate]   💬  ::debug::match not found
| Attempting to download ^1.14.3...
| matching ^1.14.3...
[tests/Validate]   💬  ::debug::check 1.16.3 satisfies ^1.14.3
[tests/Validate]   💬  ::debug::x64===x64 && darwin===linux
[tests/Validate]   💬  ::debug::x64===x64 && linux===linux
[tests/Validate]   💬  ::debug::matched 1.16.3
| Acquiring 1.16.3 from https://github.com/actions/go-versions/releases/download/1.16.3-710801405/go-1.16.3-linux-x64.tar.gz
[tests/Validate]   💬  ::debug::Downloading https://github.com/actions/go-versions/releases/download/1.16.3-710801405/go-1.16.3-linux-x64.tar.gz
[tests/Validate]   💬  ::debug::Destination /tmp/2cf29f72-a37a-4a64-a8b1-70d6c435bcaf
[tests/Validate]   💬  ::debug::download complete
| Extracting Go...
[tests/Validate]   💬  ::debug::Checking tar --version
[tests/Validate]   💬  ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason.
| [command]/bin/tar xz --warning=no-unknown-keyword -C /tmp/5a5b6c84-2153-4009-b8e8-f990d118f903 -f /tmp/2cf29f72-a37a-4a64-a8b1-70d6c435bcaf
| Successfully extracted go to /tmp/5a5b6c84-2153-4009-b8e8-f990d118f903
| Adding to the cache ...
[tests/Validate]   💬  ::debug::Caching tool go 1.16.3 x64
[tests/Validate]   💬  ::debug::source dir: /tmp/5a5b6c84-2153-4009-b8e8-f990d118f903
[tests/Validate]   💬  ::debug::destination /opt/hostedtoolcache/go/1.16.3/x64
[tests/Validate]   💬  ::debug::finished caching tool
| Successfully cached go to /opt/hostedtoolcache/go/1.16.3/x64
[tests/Validate]   ⚙  ::set-env:: GOROOT=/opt/hostedtoolcache/go/1.16.3/x64
[tests/Validate]   ⚙  ::add-path:: /opt/hostedtoolcache/go/1.16.3/x64/bin
| Added go to the path
[tests/Validate]   💬  ::debug::which go :/opt/hostedtoolcache/go/1.16.3/x64/bin/go:
[tests/Validate]   💬  ::debug::go env GOPATH :/root/go:
[tests/Validate]   💬  ::debug::creating /root/go
[tests/Validate]   💬  ::debug::creating /root/go/bin
[tests/Validate]   ⚙  ::add-path:: /root/go/bin
[tests/Validate]   💬  ::debug::add bin true
| Successfully setup go version ^1.14.3
[tests/Validate]   ❓  ##[add-matcher]/actions/actions-setup-go@master/matchers.json
| go version go1.16.3 linux/amd64
|
[tests/Validate]   ❓  ::group::go env
| GO111MODULE=""
| GOARCH="amd64"
| GOBIN=""
| GOCACHE="/root/.cache/go-build"
| GOENV="/root/.config/go/env"
| GOEXE=""
| GOFLAGS=""
| GOHOSTARCH="amd64"
| GOHOSTOS="linux"
| GOINSECURE=""
| GOMODCACHE="/root/go/pkg/mod"
| GONOPROXY=""
| GONOSUMDB=""
| GOOS="linux"
| GOPATH="/root/go"
| GOPRIVATE=""
| GOPROXY="https://proxy.golang.org,direct"
| GOROOT="/opt/hostedtoolcache/go/1.16.3/x64"
| GOSUMDB="sum.golang.org"
| GOTMPDIR=""
| GOTOOLDIR="/opt/hostedtoolcache/go/1.16.3/x64/pkg/tool/linux_amd64"
| GOVCS=""
| GOVERSION="go1.16.3"
| GCCGO="gccgo"
| AR="ar"
| CC="gcc"
| CXX="g++"
| CGO_ENABLED="1"
| GOMOD="/dev/null"
| CGO_CFLAGS="-g -O2"
| CGO_CPPFLAGS=""
| CGO_CXXFLAGS="-g -O2"
| CGO_FFLAGS="-g -O2"
| CGO_LDFLAGS="-g -O2"
| PKG_CONFIG="pkg-config"
| GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1342110234=/tmp/go-build -gno-record-gcc-switches"
|
[tests/Validate]   ❓  ::endgroup::
[tests/Validate]   ✅  Success - Setup Go
node

https://github.com/nektos/act/issues/250#issuecomment-778713506:

node workflow
# Begin omitted
on:
  push:

name: "Node"
env:
  node-version: 12.x

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Use Node.js ${{ env.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ env.node-version }}
jsoref@Joshs-MacBook-Pro 250 % act -j build
WARN[0000] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0000] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0000] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
[Node/build] 🚀  Start image=node:12.20.1-buster-slim
WARN[0000] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0000] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0000] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
[Node/build]   🐳  docker run image=node:12.20.1-buster-slim platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Node/build]   🐳  docker cp src=/Users/jsoref/code/nektos/issues/250/. dst=/Users/jsoref/code/nektos/issues/250
WARN[0000] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0000] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0000] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
[Node/build] ⭐  Run Checkout code
WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
[Node/build]   ✅  Success - Checkout code
WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist
WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory
[Node/build] ⭐  Run Use Node.js ${{ env.node-version }}
[Node/build]   ☁  git clone 'https://github.com/actions/setup-node' # ref=v1
[Node/build]   🐳  docker cp src=/Users/jsoref/.cache/act/actions-setup-node@v1 dst=/actions/
[Node/build]   💬  ::debug::isExplicit:
[Node/build]   💬  ::debug::explicit? false
[Node/build]   💬  ::debug::evaluating 0 versions
[Node/build]   💬  ::debug::match not found
[Node/build]   💬  ::debug::evaluating 450 versions
[Node/build]   💬  ::debug::matched: v12.22.0
[Node/build]   💬  ::debug::isExplicit: 12.22.0
[Node/build]   💬  ::debug::explicit? true
[Node/build]   💬  ::debug::checking cache: /opt/hostedtoolcache/node/12.22.0/x64
[Node/build]   💬  ::debug::not found
[Node/build]   💬  ::debug::Downloading https://nodejs.org/dist/v12.22.0/node-v12.22.0-linux-x64.tar.gz
[Node/build]   💬  ::debug::Destination /tmp/a498714b-b1af-43cc-917c-de6e0687e6c4
[Node/build]   💬  ::debug::download complete
[Node/build]   💬  ::debug::Checking tar --version
[Node/build]   💬  ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason.
| [command]/bin/tar xz --warning=no-unknown-keyword -C /tmp/d75ce427-6ef4-4238-9ce4-374023417348 -f /tmp/a498714b-b1af-43cc-917c-de6e0687e6c4
[Node/build]   💬  ::debug::Caching tool node 12.22.0 x64
[Node/build]   💬  ::debug::source dir: /tmp/d75ce427-6ef4-4238-9ce4-374023417348/node-v12.22.0-linux-x64
[Node/build]   💬  ::debug::destination /opt/hostedtoolcache/node/12.22.0/x64
[Node/build]   💬  ::debug::finished caching tool
[Node/build]   ⚙  ::add-path:: /opt/hostedtoolcache/node/12.22.0/x64/bin
| [command]/opt/hostedtoolcache/node/12.22.0/x64/bin/node --version
| v12.22.0
| [command]/opt/hostedtoolcache/node/12.22.0/x64/bin/npm --version
| 6.14.11
[Node/build]   ❓  ##[add-matcher]/actions/actions-setup-node@v1/.github/tsc.json
[Node/build]   ❓  ##[add-matcher]/actions/actions-setup-node@v1/.github/eslint-stylish.json
[Node/build]   ❓  ##[add-matcher]/actions/actions-setup-node@v1/.github/eslint-compact.json
[Node/build]   ✅  Success - Use Node.js ${{ env.node-version }}

n.b. it's possible my image has curl + ca-certificates installed, if that's the case, you'll just want to add custom images.

I'm using 47e1ba1 + a couple of PRs I've submitted, but I don't think they're relevant.

<!-- gh-comment-id:813109086 --> @jsoref commented on GitHub (Apr 4, 2021): <details><summary>initial description wfm</summary> https://github.com/nektos/act/issues/250#issue-620813326: ```. jsoref@Joshs-MacBook-Pro 250 % pbpaste > .github/workflows/global-env.yml jsoref@Joshs-MacBook-Pro 250 % act WARN[0000] unable to get git repo: unable to find git repo WARN[0000] unable to get git revision: unable to find git repo WARN[0000] unable to get git ref: unable to find git repo [tests/Validate] 🚀 Start image=node:12.20.1-buster-slim WARN[0000] unable to get git repo: unable to find git repo WARN[0000] unable to get git revision: unable to find git repo WARN[0000] unable to get git ref: unable to find git repo [tests/Validate] 🐳 docker run image=node:12.20.1-buster-slim platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] WARN[0000] unable to get git repo: unable to find git repo WARN[0000] unable to get git revision: unable to find git repo WARN[0000] unable to get git ref: unable to find git repo WARN[0000] unable to get git repo: unable to find git repo WARN[0000] unable to get git revision: unable to find git repo WARN[0000] unable to get git ref: unable to find git repo WARN[0000] unable to get git repo: unable to find git repo WARN[0000] unable to get git revision: unable to find git repo WARN[0000] unable to get git ref: unable to find git repo [tests/Validate] ⭐ Run Setup Go [tests/Validate] ☁ git clone 'https://github.com/actions/setup-go' # ref=master [tests/Validate] 🐳 docker cp src=/Users/jsoref/.cache/act/actions-setup-go@master dst=/actions/ | Setup go stable version spec ^1.14.3 [tests/Validate] 💬 ::debug::isExplicit: [tests/Validate] 💬 ::debug::explicit? false [tests/Validate] 💬 ::debug::evaluating 0 versions [tests/Validate] 💬 ::debug::match not found | Attempting to download ^1.14.3... | matching ^1.14.3... [tests/Validate] 💬 ::debug::check 1.16.3 satisfies ^1.14.3 [tests/Validate] 💬 ::debug::x64===x64 && darwin===linux [tests/Validate] 💬 ::debug::x64===x64 && linux===linux [tests/Validate] 💬 ::debug::matched 1.16.3 | Acquiring 1.16.3 from https://github.com/actions/go-versions/releases/download/1.16.3-710801405/go-1.16.3-linux-x64.tar.gz [tests/Validate] 💬 ::debug::Downloading https://github.com/actions/go-versions/releases/download/1.16.3-710801405/go-1.16.3-linux-x64.tar.gz [tests/Validate] 💬 ::debug::Destination /tmp/2cf29f72-a37a-4a64-a8b1-70d6c435bcaf [tests/Validate] 💬 ::debug::download complete | Extracting Go... [tests/Validate] 💬 ::debug::Checking tar --version [tests/Validate] 💬 ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason. | [command]/bin/tar xz --warning=no-unknown-keyword -C /tmp/5a5b6c84-2153-4009-b8e8-f990d118f903 -f /tmp/2cf29f72-a37a-4a64-a8b1-70d6c435bcaf | Successfully extracted go to /tmp/5a5b6c84-2153-4009-b8e8-f990d118f903 | Adding to the cache ... [tests/Validate] 💬 ::debug::Caching tool go 1.16.3 x64 [tests/Validate] 💬 ::debug::source dir: /tmp/5a5b6c84-2153-4009-b8e8-f990d118f903 [tests/Validate] 💬 ::debug::destination /opt/hostedtoolcache/go/1.16.3/x64 [tests/Validate] 💬 ::debug::finished caching tool | Successfully cached go to /opt/hostedtoolcache/go/1.16.3/x64 [tests/Validate] ⚙ ::set-env:: GOROOT=/opt/hostedtoolcache/go/1.16.3/x64 [tests/Validate] ⚙ ::add-path:: /opt/hostedtoolcache/go/1.16.3/x64/bin | Added go to the path [tests/Validate] 💬 ::debug::which go :/opt/hostedtoolcache/go/1.16.3/x64/bin/go: [tests/Validate] 💬 ::debug::go env GOPATH :/root/go: [tests/Validate] 💬 ::debug::creating /root/go [tests/Validate] 💬 ::debug::creating /root/go/bin [tests/Validate] ⚙ ::add-path:: /root/go/bin [tests/Validate] 💬 ::debug::add bin true | Successfully setup go version ^1.14.3 [tests/Validate] ❓ ##[add-matcher]/actions/actions-setup-go@master/matchers.json | go version go1.16.3 linux/amd64 | [tests/Validate] ❓ ::group::go env | GO111MODULE="" | GOARCH="amd64" | GOBIN="" | GOCACHE="/root/.cache/go-build" | GOENV="/root/.config/go/env" | GOEXE="" | GOFLAGS="" | GOHOSTARCH="amd64" | GOHOSTOS="linux" | GOINSECURE="" | GOMODCACHE="/root/go/pkg/mod" | GONOPROXY="" | GONOSUMDB="" | GOOS="linux" | GOPATH="/root/go" | GOPRIVATE="" | GOPROXY="https://proxy.golang.org,direct" | GOROOT="/opt/hostedtoolcache/go/1.16.3/x64" | GOSUMDB="sum.golang.org" | GOTMPDIR="" | GOTOOLDIR="/opt/hostedtoolcache/go/1.16.3/x64/pkg/tool/linux_amd64" | GOVCS="" | GOVERSION="go1.16.3" | GCCGO="gccgo" | AR="ar" | CC="gcc" | CXX="g++" | CGO_ENABLED="1" | GOMOD="/dev/null" | CGO_CFLAGS="-g -O2" | CGO_CPPFLAGS="" | CGO_CXXFLAGS="-g -O2" | CGO_FFLAGS="-g -O2" | CGO_LDFLAGS="-g -O2" | PKG_CONFIG="pkg-config" | GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1342110234=/tmp/go-build -gno-record-gcc-switches" | [tests/Validate] ❓ ::endgroup:: [tests/Validate] ✅ Success - Setup Go ``` </details> <details><summary>node</summary> https://github.com/nektos/act/issues/250#issuecomment-778713506: <details><summary>node workflow</summary> ```yaml # Begin omitted on: push: name: "Node" env: node-version: 12.x jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Use Node.js ${{ env.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ env.node-version }} ``` </details> ``` jsoref@Joshs-MacBook-Pro 250 % act -j build WARN[0000] unable to get git repo: section "remote \"origin\"" does not exist WARN[0000] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0000] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory [Node/build] 🚀 Start image=node:12.20.1-buster-slim WARN[0000] unable to get git repo: section "remote \"origin\"" does not exist WARN[0000] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0000] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory [Node/build] 🐳 docker run image=node:12.20.1-buster-slim platform=linux/amd64 entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Node/build] 🐳 docker cp src=/Users/jsoref/code/nektos/issues/250/. dst=/Users/jsoref/code/nektos/issues/250 WARN[0000] unable to get git repo: section "remote \"origin\"" does not exist WARN[0000] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0000] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory [Node/build] ⭐ Run Checkout code WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory [Node/build] ✅ Success - Checkout code WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git repo: section "remote \"origin\"" does not exist WARN[0001] unable to get git revision: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory WARN[0001] unable to get git ref: open /Users/jsoref/code/nektos/issues/250/.git/refs/heads/main: no such file or directory [Node/build] ⭐ Run Use Node.js ${{ env.node-version }} [Node/build] ☁ git clone 'https://github.com/actions/setup-node' # ref=v1 [Node/build] 🐳 docker cp src=/Users/jsoref/.cache/act/actions-setup-node@v1 dst=/actions/ [Node/build] 💬 ::debug::isExplicit: [Node/build] 💬 ::debug::explicit? false [Node/build] 💬 ::debug::evaluating 0 versions [Node/build] 💬 ::debug::match not found [Node/build] 💬 ::debug::evaluating 450 versions [Node/build] 💬 ::debug::matched: v12.22.0 [Node/build] 💬 ::debug::isExplicit: 12.22.0 [Node/build] 💬 ::debug::explicit? true [Node/build] 💬 ::debug::checking cache: /opt/hostedtoolcache/node/12.22.0/x64 [Node/build] 💬 ::debug::not found [Node/build] 💬 ::debug::Downloading https://nodejs.org/dist/v12.22.0/node-v12.22.0-linux-x64.tar.gz [Node/build] 💬 ::debug::Destination /tmp/a498714b-b1af-43cc-917c-de6e0687e6c4 [Node/build] 💬 ::debug::download complete [Node/build] 💬 ::debug::Checking tar --version [Node/build] 💬 ::debug::tar (GNU tar) 1.30%0ACopyright (C) 2017 Free Software Foundation, Inc.%0ALicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.%0AThis is free software: you are free to change and redistribute it.%0AThere is NO WARRANTY, to the extent permitted by law.%0A%0AWritten by John Gilmore and Jay Fenlason. | [command]/bin/tar xz --warning=no-unknown-keyword -C /tmp/d75ce427-6ef4-4238-9ce4-374023417348 -f /tmp/a498714b-b1af-43cc-917c-de6e0687e6c4 [Node/build] 💬 ::debug::Caching tool node 12.22.0 x64 [Node/build] 💬 ::debug::source dir: /tmp/d75ce427-6ef4-4238-9ce4-374023417348/node-v12.22.0-linux-x64 [Node/build] 💬 ::debug::destination /opt/hostedtoolcache/node/12.22.0/x64 [Node/build] 💬 ::debug::finished caching tool [Node/build] ⚙ ::add-path:: /opt/hostedtoolcache/node/12.22.0/x64/bin | [command]/opt/hostedtoolcache/node/12.22.0/x64/bin/node --version | v12.22.0 | [command]/opt/hostedtoolcache/node/12.22.0/x64/bin/npm --version | 6.14.11 [Node/build] ❓ ##[add-matcher]/actions/actions-setup-node@v1/.github/tsc.json [Node/build] ❓ ##[add-matcher]/actions/actions-setup-node@v1/.github/eslint-stylish.json [Node/build] ❓ ##[add-matcher]/actions/actions-setup-node@v1/.github/eslint-compact.json [Node/build] ✅ Success - Use Node.js ${{ env.node-version }} ``` </details> n.b. it's possible my image has `curl` + `ca-certificates` installed, if that's the case, you'll just want to add custom images. I'm using 47e1ba1 + a couple of PRs I've submitted, but I don't think they're relevant.
Author
Owner

@github-actions[bot] commented on GitHub (May 5, 2021):

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

<!-- gh-comment-id:832331566 --> @github-actions[bot] commented on GitHub (May 5, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@catthehacker commented on GitHub (Aug 9, 2021):

This seems to work now.

<!-- gh-comment-id:895580703 --> @catthehacker commented on GitHub (Aug 9, 2021): This seems to work now.
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#172
No description provided.