[PR #771] [MERGED] Add reading environment from Docker image #1598

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/771
Author: @catthehacker
Created: 8/9/2021
Status: Merged
Merged: 9/26/2021
Merged by: @mergify[bot]

Base: masterHead: cat/fix/read-image-spec


📝 Commits (4)

  • fcefd89 fix: read envvars from image definition
  • c648bb9 fix: add test
  • 3248836 fix: sort slices
  • 93dc252 Merge branch 'master' into cat/fix/read-image-spec

📊 Changes

2 files changed (+75 additions, -1 deletions)

View changed files

📝 pkg/container/docker_run.go (+41 -1)
pkg/container/docker_run_test.go (+34 -0)

📄 Description

This change will add reading image definition and merging it's environment variables with our current env in style of:

  • missing envvar, creates new one
  • existing envvar is overwritten by our env
  • PATH envvar is merged, container PATH is last to not overwrite any tools installed during workflow

It's not required for running our main container but it will be probably more intuitive if it will work like standard docker and this change is required for nested containers started in workflow

Fixes https://github.com/nektos/act/issues/757


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/771 **Author:** [@catthehacker](https://github.com/catthehacker) **Created:** 8/9/2021 **Status:** ✅ Merged **Merged:** 9/26/2021 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `cat/fix/read-image-spec` --- ### 📝 Commits (4) - [`fcefd89`](https://github.com/nektos/act/commit/fcefd898df2f8a992e658bb13b74fc72c3a71f3e) fix: read envvars from image definition - [`c648bb9`](https://github.com/nektos/act/commit/c648bb9cf2042dcabb4c26ce5c059a9cf8a1009f) fix: add test - [`3248836`](https://github.com/nektos/act/commit/3248836c1e564b5722453d5c89b291dc5c6370dd) fix: sort slices - [`93dc252`](https://github.com/nektos/act/commit/93dc2522ec539064d5395648cce68138d322b564) Merge branch 'master' into cat/fix/read-image-spec ### 📊 Changes **2 files changed** (+75 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/container/docker_run.go` (+41 -1) ➕ `pkg/container/docker_run_test.go` (+34 -0) </details> ### 📄 Description This change will add reading image definition and merging it's environment variables with our current env in style of: - missing envvar, creates new one - existing envvar is overwritten by our env - `PATH` envvar is merged, container `PATH` is last to not overwrite any tools installed during workflow It's not required for running our main container but it will be probably more intuitive if it will work like standard docker and this change is required for nested containers started in workflow Fixes https://github.com/nektos/act/issues/757 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:52 +03:00
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#1598
No description provided.