Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions .github/workflows/daily-news.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pkg/workflow/awf_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,8 @@ func TestBuildAWFCommand_AddsToolCacheMountProbe(t *testing.T) {
command := BuildAWFCommand(config)

assert.Contains(t, command, `GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:-/opt/hostedtoolcache}"`, "should detect RUNNER_TOOL_CACHE with hostedtoolcache fallback")
assert.Contains(t, command, `GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"`, "should mount non-/opt tool cache paths")
assert.Contains(t, command, `GH_AW_TOOL_CACHE_MOUNT="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"`, "should mount detected tool cache path")
assert.NotContains(t, command, `if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then`, "should not skip /opt tool cache paths")
assert.Contains(t, command, `GH_AW_TOOL_CACHE_MOUNT="/home/runner/work/_tool:/home/runner/work/_tool:ro"`, "should include fallback mount for legacy _tool path")
assert.Contains(t, command, `${GH_AW_TOOL_CACHE_MOUNT:+--mount "$GH_AW_TOOL_CACHE_MOUNT"}`, "should inject tool-cache mount args into awf invocation")
}
Expand Down
4 changes: 1 addition & 3 deletions pkg/workflow/awf_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,7 @@ fi`,
toolCacheMountProbe := fmt.Sprintf(`%s=""
GH_AW_TOOL_CACHE="${RUNNER_TOOL_CACHE:-/opt/hostedtoolcache}"
if [ -d "$GH_AW_TOOL_CACHE" ]; then
if [[ "$GH_AW_TOOL_CACHE" != /opt/* ]]; then
%s="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
fi
%s="$GH_AW_TOOL_CACHE:$GH_AW_TOOL_CACHE:ro"
elif [ -d "/home/runner/work/_tool" ]; then
%s="/home/runner/work/_tool:/home/runner/work/_tool:ro"
fi`,
Expand Down
Loading