[GH-ISSUE #1551] Formatting of environment variable name #781

Closed
opened 2026-03-01 21:46:18 +03:00 by kerem · 1 comment
Owner

Originally created by @lobbin on GitHub (Jan 9, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1551

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
Config files:
	/Users/x/.actrc:
		-P ubuntu-latest=node:16-buster-slim
		-P -P ubuntu-22.04=node:16-bullseye-slim
		ubuntu-20.04=node:16-buster-slim
		-P ubuntu-18.04=node:16-buster-slim
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.12
	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:               x86_64
	OS kernel:             5.10.76-linuxkit
	OS CPU:                4
	OS memory:             1985 MB
	Security options:
		name=seccomp,profile=default
		name=cgroupns

Command used with act

act -W .github/workflows/run-test.yaml workflow_dispatch

Describe issue

When passing env variables from a step, act seems to uppercase the environment variables. The action "dark-mechanicum/aws-codebuild@v1" relies on that case format of environment variables remains the same.

Example:

- name: Run CodeBuild
  uses: dark-mechanicum/aws-codebuild@v1
  with:
    projectName: InternalInfrastructure-sysdev-BuildPrimaryRegionCentral
  env:
    CODEBUILD__sourceTypeOverride: S3
    CODEBUILD__sourceLocationOverride: <path to file>

That results in env variables will instead be passed as "CODEBUILD__SOURCETYPEOVERRIDE" and "CODEBUILD_SOURCELOCATIONOVERRIDE". However, it passed via command line, it works as expected.

--env CODEBUILD__sourceTypeOverride=S3 --env CODEBUILD__sourceLocationOverride=<path to file>

No response

Workflow content

See above.

Relevant log output

[DEBUG] setupEnv => map[... CODEBUILD__SOURCELOCATIONOVERRIDE:<pathtofile> CODEBUILD__SOURCETYPEOVERRIDE:S3 ...]

Additional information

No response

Originally created by @lobbin on GitHub (Jan 9, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1551 ### 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 Config files: /Users/x/.actrc: -P ubuntu-latest=node:16-buster-slim -P -P ubuntu-22.04=node:16-bullseye-slim ubuntu-20.04=node:16-buster-slim -P ubuntu-18.04=node:16-buster-slim 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.12 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: x86_64 OS kernel: 5.10.76-linuxkit OS CPU: 4 OS memory: 1985 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act -W .github/workflows/run-test.yaml workflow_dispatch ``` ### Describe issue When passing env variables from a step, act seems to uppercase the environment variables. The action "dark-mechanicum/aws-codebuild@v1" relies on that case format of environment variables remains the same. Example: ``` - name: Run CodeBuild uses: dark-mechanicum/aws-codebuild@v1 with: projectName: InternalInfrastructure-sysdev-BuildPrimaryRegionCentral env: CODEBUILD__sourceTypeOverride: S3 CODEBUILD__sourceLocationOverride: <path to file> ``` That results in env variables will instead be passed as "CODEBUILD__SOURCETYPEOVERRIDE" and "CODEBUILD_SOURCELOCATIONOVERRIDE". However, it passed via command line, it works as expected. ``` --env CODEBUILD__sourceTypeOverride=S3 --env CODEBUILD__sourceLocationOverride=<path to file> ``` ### Link to GitHub repository _No response_ ### Workflow content ```yml See above. ``` ### Relevant log output ```sh [DEBUG] setupEnv => map[... CODEBUILD__SOURCELOCATIONOVERRIDE:<pathtofile> CODEBUILD__SOURCETYPEOVERRIDE:S3 ...] ``` ### Additional information _No response_
kerem 2026-03-01 21:46:18 +03:00
Author
Owner

@KnisterPeter commented on GitHub (Jan 13, 2023):

Hi @lobbin,
please update your version. This bug should be fixed in master (github.com/nektos/act@0f8861b9e3) and is released with v0.2.35

<!-- gh-comment-id:1381941229 --> @KnisterPeter commented on GitHub (Jan 13, 2023): Hi @lobbin, please update your version. This bug should be fixed in master (https://github.com/nektos/act/commit/0f8861b9e37bfdf5e0fabb188d03365c0401823a) and is released with `v0.2.35`
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#781
No description provided.