Skip to content

Support array expressions in runs-on#2088

Merged
mergify[bot] merged 3 commits intonektos:masterfrom
jenseng:runs-on-array-expression
Nov 12, 2023
Merged

Support array expressions in runs-on#2088
mergify[bot] merged 3 commits intonektos:masterfrom
jenseng:runs-on-array-expression

Conversation

@jenseng
Copy link
Contributor

@jenseng jenseng commented Nov 11, 2023

Ensure array expressions in runs-on are handled correctly. Also fix -P to work case-insensitively, since labels are not case sensitive.

There is still one outstanding issue with runs-on and expressions, but that is not new to this PR: a matrix with a templated runs-on (e.g. runs-on: ${{ matrix.label }}). That feels like a bigger fix/refactor, so I was thinking of filing a new issue issue/PR for that, but if you'd prefer I can incorporate it into this one.

Fixes #2080

@codecov
Copy link

codecov bot commented Nov 11, 2023

Codecov Report

Merging #2088 (6909443) into master (4989f44) will increase coverage by 0.33%.
Report is 267 commits behind head on master.
The diff coverage is 60.08%.

@@            Coverage Diff             @@
##           master    #2088      +/-   ##
==========================================
+ Coverage   61.22%   61.55%   +0.33%     
==========================================
  Files          46       53       +7     
  Lines        7141     8779    +1638     
==========================================
+ Hits         4372     5404    +1032     
- Misses       2462     2949     +487     
- Partials      307      426     +119     
Files Coverage Δ
pkg/common/executor.go 51.69% <100.00%> (+1.69%) ⬆️
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/runner/step_action_local.go 93.54% <100.00%> (ø)
pkg/runner/step_action_remote.go 91.56% <100.00%> (+0.65%) ⬆️
pkg/runner/step_docker.go 93.18% <100.00%> (ø)
pkg/container/file_collector.go 39.68% <0.00%> (+2.38%) ⬆️
pkg/container/util.go 0.00% <0.00%> (ø)
pkg/container/docker_build.go 60.00% <80.00%> (+1.02%) ⬆️
...ontainer/linux_container_environment_extensions.go 23.07% <0.00%> (-1.25%) ⬇️
... and 31 more

... and 2 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@jenseng jenseng marked this pull request as ready for review November 11, 2023 20:19
@jenseng jenseng requested a review from a team as a code owner November 11, 2023 20:19
@mergify mergify bot requested a review from a team November 11, 2023 21:14
@pull-request-size pull-request-size bot added size/M and removed size/L labels Nov 12, 2023
Copy link
Contributor

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

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

Looks good to me.

My idea for matrix jobs is to clone the job struct for each matrix leg, should fix a lot of side effects.

You are right matrix job polution issues are already present in act

@mergify mergify bot merged commit 610358e into nektos:master Nov 12, 2023
jenseng added a commit to jenseng/act that referenced this pull request Nov 23, 2023
Move the logging back up a level to fix a minor logging issue introduced in nektos#2088

`RunContext`s for composite actions have dummy/blank `Job`s with no `runs-on`,
meaning their calls to `withGithubEnv` would result in an inaccurate log message
complaining that `'runs-on' key not defined in ...`
jenseng added a commit to jenseng/act that referenced this pull request Nov 23, 2023
Move the logging back up a level to fix a minor logging issue introduced in nektos#2088

`RunContext`s for composite actions have dummy/blank `Job`s with no `runs-on`,
meaning their calls to `withGithubEnv` would result in an inaccurate log message
complaining that `'runs-on' key not defined in ...`
mergify bot added a commit that referenced this pull request Dec 16, 2023
Move the logging back up a level to fix a minor logging issue introduced in #2088

`RunContext`s for composite actions have dummy/blank `Job`s with no `runs-on`,
meaning their calls to `withGithubEnv` would result in an inaccurate log message
complaining that `'runs-on' key not defined in ...`

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
jmikedupont2 pushed a commit to meta-introspector/act that referenced this pull request Mar 10, 2024
* Support array expressions in runs-on

* Simplify appproach to use EvaluateYamlNode, fix case-sensitivity bug

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
jmikedupont2 pushed a commit to meta-introspector/act that referenced this pull request Mar 10, 2024
Move the logging back up a level to fix a minor logging issue introduced in nektos#2088

`RunContext`s for composite actions have dummy/blank `Job`s with no `runs-on`,
meaning their calls to `withGithubEnv` would result in an inaccurate log message
complaining that `'runs-on' key not defined in ...`

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

runs-on does not accept array expressions

3 participants