[GH-ISSUE #1990] $RUNNER_OS and "${{ runner.os }}" case differs from Github Actions #953

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

Originally created by @virzak on GitHub (Sep 1, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1990

Bug report info

act version:            0.2.49
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
Build info:
        Go version:            go1.20.6
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.49 -X main.commit=d5d854854651c151ecd914bb6e2e370e0057929a -X main.date=2023-08-01T02:21:56Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         d5d854854651c151ecd914bb6e2e370e0057929a
                vcs.time:             2023-08-01T02:21:38Z
                vcs.modified:         false
Docker Engine:
        Engine version:        24.0.5
        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.15.90.4-microsoft-standard-WSL2
        OS CPU:                16
        OS memory:             15696 MB
        Security options:
                name=seccomp,profile=unconfined

Command used with act

act -P windows-latest=-self-hosted

Describe issue

Expect Windows where W is capitalized, which is the output from Github Actions.
Getting all lowered case letters.

No response

Workflow content

name: Build

on:
  push:

jobs:

  build:

    runs-on: windows-latest
    defaults:
      run:
        shell: bash

    steps:
    - name: Set path for nektos/act
      if: ${{ runner.os  == 'Windows' && env.ACT }}
      run: echo "C:\Program Files\Git\bin" >> $GITHUB_PATH
      shell: '"C:\Program Files\Git\bin\bash.exe" -c {0}'

    - name: 'Determine prerequisites'
      id: prereq
      run: |
        echo "$RUNNER_OS" "${{ runner.os }}"

Relevant log output

🚀  act -P windows-latest=-self-hosted
[Build/build] ⭐ Run Main Set path for nektos/act
[Build/build]   ✅  Success - Main Set path for nektos/act
[Build/build]   ⚙  ::add-path:: C:\Program Files\Git\bin
[Build/build] ⭐ Run Main Determine prerequisites
| windows windows
[Build/build]   ✅  Success - Main Determine prerequisites
[Build/build] 🏁  Job succeeded

Additional information

No response

Originally created by @virzak on GitHub (Sep 1, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1990 ### Bug report info ```plain text act version: 0.2.49 GOOS: windows GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: \\.\pipe\docker_engine(broken) Config files: Build info: Go version: go1.20.6 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.49 -X main.commit=d5d854854651c151ecd914bb6e2e370e0057929a -X main.date=2023-08-01T02:21:56Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: windows GOAMD64: v1 vcs: git vcs.revision: d5d854854651c151ecd914bb6e2e370e0057929a vcs.time: 2023-08-01T02:21:38Z vcs.modified: false Docker Engine: Engine version: 24.0.5 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.15.90.4-microsoft-standard-WSL2 OS CPU: 16 OS memory: 15696 MB Security options: name=seccomp,profile=unconfined ``` ### Command used with act ```sh act -P windows-latest=-self-hosted ``` ### Describe issue Expect Windows where W is capitalized, which is the output from Github Actions. Getting all lowered case letters. ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Build on: push: jobs: build: runs-on: windows-latest defaults: run: shell: bash steps: - name: Set path for nektos/act if: ${{ runner.os == 'Windows' && env.ACT }} run: echo "C:\Program Files\Git\bin" >> $GITHUB_PATH shell: '"C:\Program Files\Git\bin\bash.exe" -c {0}' - name: 'Determine prerequisites' id: prereq run: | echo "$RUNNER_OS" "${{ runner.os }}" ``` ### Relevant log output ```sh 🚀 act -P windows-latest=-self-hosted [Build/build] ⭐ Run Main Set path for nektos/act [Build/build] ✅ Success - Main Set path for nektos/act [Build/build] ⚙ ::add-path:: C:\Program Files\Git\bin [Build/build] ⭐ Run Main Determine prerequisites | windows windows [Build/build] ✅ Success - Main Determine prerequisites [Build/build] 🏁 Job succeeded ``` ### Additional information _No response_
kerem 2026-03-01 21:47:41 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@github-actions[bot] commented on GitHub (Feb 29, 2024):

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

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

@virzak commented on GitHub (Feb 29, 2024):

bump

<!-- gh-comment-id:1970266567 --> @virzak commented on GitHub (Feb 29, 2024): bump
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#953
No description provided.