8000 Refactor evaluate yaml node do not alter nested nodes by ChristopherHX · Pull Request #1761 · nektos/act · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Refactor evaluate yaml node do not alter nested nodes #1761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 3, 2023

Conversation

ChristopherHX
Copy link
Contributor

Using EvaluateYamlNode for evaluating job properties of matrix jobs has been problematic, it altered the nested yaml.Node structures in place.

EvaluateYamlNode now clones the modified yaml.Node to preserve the original yaml structure for evaluation in another yaml node.

To make it possible to implement the following, which works in GitHub Actions. This is allowed via the official GitHub Actions schema file: https://github.com/actions/languageservices/blob/main/workflow-parser/src/workflow-v1.0.json. This file is much newer than the one of actions/runner.

on: push
jobs:
  _:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
        - key: a
          env:
            myenv: v0
            anothervar: v1
        - key: b
          env:
            myenv2: v0
            anothervar2: v1
    env: # can also be directly assigned to ${{ matrix.env }}
      ${{ insert }}: ${{ matrix.env }}
      env1: val0
      ${{ matrix.key }}: ${{ tojson(matrix.env) }}
    steps:
    - run: env

@codecov
Copy link
codecov bot commented Apr 24, 2023

Codecov Report

Merging #1761 (8a38be7) into master (4989f44) will increase coverage by 1.20%.
The diff coverage is 64.48%.

@@            Coverage Diff             @@
##           master    #1761      +/-   ##
==========================================
+ Coverage   61.22%   62.42%   +1.20%     
==========================================
  Files          46       51       +5     
  Lines        7141     8131     +990     
==========================================
+ Hits         4372     5076     +704     
- Misses       2462     2667     +205     
- Partials      307      388      +81     
Impacted Files Coverage Δ
pkg/common/outbound_ip.go 0.00% <0.00%> (ø)
pkg/container/docker_cli.go 82.23% <ø> (ø)
pkg/container/docker_logger.go 52.08% <ø> (ø)
pkg/container/docker_run.go 13.58% <0.00%> (-0.01%) ⬇️
pkg/container/docker_volume.go 0.00% <ø> (ø)
pkg/container/file_collector.go 39.68% <0.00%> (+2.38%) ⬆️
pkg/container/host_environment.go 0.00% <0.00%> (ø)
...ontainer/linux_container_environment_extensions.go 23.07% <0.00%> (-1.25%) ⬇️
pkg/exprparser/functions.go 66.32% <0.00%> (-1.04%) ⬇️
pkg/model/workflow.go 42.44% <9.09%> (+0.32%) ⬆️
... and 25 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor
github-actions bot commented Apr 25, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 1 0 0.01s
✅ REPOSITORY gitleaks yes no 2.97s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY secretlint yes no 1.59s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@ChristopherHX ChristopherHX marked this pull request as ready for review May 1, 2023 19:42
@ChristopherHX ChristopherHX requested a review from a team as a code owner May 1, 2023 19:42
@mergify
Copy link
Contributor
mergify bot commented May 3, 2023

@ChristopherHX this pull request has failed checks 🛠

@mergify mergify bot added needs-work Extra attention is needed and removed needs-work Extra attention is needed labels May 3, 2023
@mergify mergify bot merged commit 568124c into master May 3, 2023
@mergify mergify bot deleted the refactor-EvaluateYamlNode-do-not-alter-nested-nodes branch May 3, 2023 17:26
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
0