Skip to content

fix(actions): evaluate expressions in job container config before forwarding to runner - #38696

Open
okxint wants to merge 3 commits into
go-gitea:mainfrom
okxint:fix/actions-evaluate-rawcontainer-expressions
Open

fix(actions): evaluate expressions in job container config before forwarding to runner#38696
okxint wants to merge 3 commits into
go-gitea:mainfrom
okxint:fix/actions-evaluate-rawcontainer-expressions

Conversation

@okxint

@okxint okxint commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

RawContainer holds the job-level container configuration (image, env, volumes). These fields support workflow expressions like ${{ env.MY_IMAGE }}, but jobparser never called EvaluateYamlNode on RawContainer before passing the parsed job to the runner. The runner received the raw expression strings rather than resolved values.

Root cause

In modules/actions/jobparser/jobparser.go, the loop that builds each matrix permutation already evaluates RawContinueOnError via evaluator.EvaluateYamlNode. The equivalent call was missing for RawContainer.

Fix

Add the same three-line evaluation block for RawContainer, immediately after RawContinueOnError, mirroring the existing pattern.

if err := evaluator.EvaluateYamlNode(&job.RawContainer); err != nil {
    return nil, fmt.Errorf("evaluate container for job %q: %w", id, err)
}

okxint added 3 commits July 21, 2026 12:33
Safari treats inline <span> baseline differently from Chrome/Firefox,
causing ActionStatusIcon SVGs to appear vertically misaligned in the
action matrix build status list. Adding `display: inline-flex`,
`align-items: center`, and `vertical-align: middle` to the wrapper span
normalises alignment across browsers.

Fixes: go-gitea#38553

Assisted-by: claude-sonnet-4-6
… to runner

RawContainer holds the job-level container config including image, env,
and volumes. These fields can contain workflow expressions such as
${{ env.MY_IMAGE }}, but jobparser never called EvaluateYamlNode on
RawContainer before passing the job to the runner. The runner received
unexpanded expression strings rather than the resolved values.

The adjacent RawContinueOnError field already uses this pattern; apply
the same evaluation call for RawContainer.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 29, 2026
@github-actions github-actions Bot added topic/gitea-actions related to the actions of Gitea type/bug labels Jul 29, 2026
align-items: center;
vertical-align: middle;
}
</style>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change? This was already fixed in 8731ea4bbb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/gitea-actions related to the actions of Gitea type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants