Skip to content

feat: support runs-on labels and group#2062

Merged
mergify[bot] merged 2 commits intonektos:masterfrom
raffis:feat-support-runs-labels
Nov 12, 2023
Merged

feat: support runs-on labels and group#2062
mergify[bot] merged 2 commits intonektos:masterfrom
raffis:feat-support-runs-labels

Conversation

@raffis
Copy link
Contributor

@raffis raffis commented Oct 24, 2023

Current situation

act does not work with our worklfow declarations which are as follow:

  build:
    runs-on:
      labels:
        - generic-v2

acts runs-on only supports a string or or a string slice. However the github workflow schema does support group and labels keys.
See https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/github-workflow.json#L703-L721 for reference.

Proposal

This pr actually supports this use case. It will just combine labels and optional group declarations in the runs on output slice. This should be suitable for cover use cases for custom images targeting these labels.

Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
@raffis raffis requested a review from a team as a code owner October 24, 2023 08:39
@raffis
Copy link
Contributor Author

raffis commented Nov 6, 2023

Any update on this?

@codecov
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

Merging #2062 (36a53c8) into master (4989f44) will increase coverage by 0.36%.
Report is 271 commits behind head on master.
The diff coverage is 60.01%.

@@            Coverage Diff             @@
##           master    #2062      +/-   ##
==========================================
+ Coverage   61.22%   61.58%   +0.36%     
==========================================
  Files          46       53       +7     
  Lines        7141     8807    +1666     
==========================================
+ Hits         4372     5424    +1052     
- Misses       2462     2951     +489     
- Partials      307      432     +125     
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 37.30% <0.00%> (ø)
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!

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.

Thank you for implementing this,
Yes act should support this, but another maintainer or the owner need to approve too

@mergify mergify bot merged commit 04011b6 into nektos:master Nov 12, 2023
jmikedupont2 pushed a commit to meta-introspector/act that referenced this pull request Mar 10, 2024
Signed-off-by: Raffael Sahli <raffael.sahli@doodle.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
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.

3 participants