Skip to content

Feature: uses in composite#793

Merged
mergify[bot] merged 56 commits intonektos:masterfrom
ChristopherHX:feature/uses-in-composite
Dec 22, 2021
Merged

Feature: uses in composite#793
mergify[bot] merged 56 commits intonektos:masterfrom
ChristopherHX:feature/uses-in-composite

Conversation

@ChristopherHX
Copy link
Contributor

@ChristopherHX ChristopherHX commented Aug 30, 2021

Remove the old hack for composite run steps, use the real runcontext directly.
You can also enable if's in composite, I plan to enable it in https://github.com/ChristopherHX/github-act-runner by default.
If's are now enabled see https://github.com/actions/runner/releases/tag/v2.284.0

Resolves #783
Resolves #926

This change seems to be functional complete.
Multi nested composite needs more Tests, maybe the size will get xl after more tests are added.

@mergify

This comment has been minimized.

@mergify mergify bot added the needs-work Extra attention is needed label Aug 30, 2021
@mergify

This comment has been minimized.

@mergify

This comment has been minimized.

@mergify

This comment has been minimized.

@mergify

This comment has been minimized.

@mergify

This comment has been minimized.

@mergify

This comment has been minimized.

@mergify

This comment has been minimized.

@ChristopherHX
Copy link
Contributor Author

I'm confused,

  • the runner doesn't log the exit code of the tests
  • Check failure on linux/macOS, doesn't contains FAIL in the log either
  • No idea what to try next, is this fail due to the actions/runner???

@ChristopherHX
Copy link
Contributor Author

ChristopherHX commented Aug 30, 2021

@mergify

This comment has been minimized.

@codecov
Copy link

codecov bot commented Aug 30, 2021

Codecov Report

Merging #793 (99b21b3) into master (0f04942) will increase coverage by 7.78%.
The diff coverage is 64.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #793      +/-   ##
==========================================
+ Coverage   49.27%   57.05%   +7.78%     
==========================================
  Files          23       28       +5     
  Lines        2401     4222    +1821     
==========================================
+ Hits         1183     2409    +1226     
- Misses       1090     1605     +515     
- Partials      128      208      +80     
Impacted Files Coverage Δ
pkg/common/executor.go 46.90% <0.00%> (+2.03%) ⬆️
pkg/common/job_error.go 0.00% <0.00%> (ø)
pkg/common/outbound_ip.go 0.00% <0.00%> (ø)
pkg/common/testflag.go 0.00% <0.00%> (ø)
pkg/container/docker_volume.go 0.00% <0.00%> (ø)
pkg/model/action.go 0.00% <0.00%> (ø)
pkg/container/docker_run.go 5.54% <14.15%> (+3.61%) ⬆️
pkg/common/git.go 49.82% <31.81%> (-9.97%) ⬇️
pkg/runner/logger.go 65.43% <37.50%> (+1.28%) ⬆️
pkg/container/docker_auth.go 45.00% <45.00%> (ø)
... and 35 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ef30c3...99b21b3. Read the comment docs.

@mergify mergify bot removed the needs-work Extra attention is needed label Aug 30, 2021
@mergify

This comment has been minimized.

@mergify mergify bot added the needs-work Extra attention is needed label Aug 30, 2021
@mergify mergify bot removed the needs-work Extra attention is needed label Aug 30, 2021
@mergify mergify bot added the needs-work Extra attention is needed label Dec 22, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 22, 2021

@ChristopherHX this pull request is now in conflict 😩

@mergify mergify bot added the conflict PR has conflicts label Dec 22, 2021
@ChristopherHX ChristopherHX dismissed stale reviews from cplee and catthehacker via 1903876 December 22, 2021 08:17
@mergify mergify bot removed the conflict PR has conflicts label Dec 22, 2021
@mergify
Copy link
Contributor

mergify bot commented Dec 22, 2021

@ChristopherHX this pull request has failed checks 🛠

@ChristopherHX
Copy link
Contributor Author

Please help me, what is wrong with superlinter? It just crashs because a file is missing?
https://github.com/nektos/act/runs/4604475831?check_suite_focus=true

I resolved the merge conflict of today.

@catthehacker
Copy link
Member

@ChristopherHX it's broken, don't worry about your update

@catthehacker
Copy link
Member

@mergify
Copy link
Contributor

mergify bot commented Dec 22, 2021

@ChristopherHX this pull request is now in conflict 😩

@mergify mergify bot added the conflict PR has conflicts label Dec 22, 2021
@mergify mergify bot removed the conflict PR has conflicts label Dec 22, 2021
@mergify mergify bot removed the needs-work Extra attention is needed label Dec 22, 2021
@mergify mergify bot requested a review from a team December 22, 2021 19:01
@mergify mergify bot merged commit 9868e13 into nektos:master Dec 22, 2021
@catthehacker
Copy link
Member

🎉

@davetapley
Copy link
Contributor

@catthehacker any chance of getting a new release with this in? 🙏🏻

project-mirrors-bot-tu bot pushed a commit to project-mirrors/forgejo-runner-as-gitea-act-runner-fork that referenced this pull request Jul 28, 2025
* Feature: uses in composite

* Negate logic

* Reduce complexity

* Update step_context.go

* Update step_context.go

* Update step_context.go

* Fix syntax error in test

* Bump

* Disable usage of actions/setup-node@v2

* Bump

* Fix step id collision

* Fix output command workaround

* Make secrets context inaccessible in composite

* Fix order after adding a workaround (needs tests)

Fixes nektos/act#793 (comment)

* Evaluate env before passing one step deeper

If env would contain any inputs, steps ctx or secrets there was undefined behaviour

* [no ci] prepare secret test

* Initial test pass inputs as env

* Fix syntax error

* extend test also for direct invoke

* Fix passing provided env as composite output

* Fix syntax error

* toUpper 'no such secret', act has a bug

* fix indent

* Fix env outputs in composite

* Test env outputs of composite

* Fix inputs not defined in docker actions

* Fix interpolate args input of docker actions

* Fix lint

* AllowCompositeIf now defaults to true

see https://github.com/actions/runner/releases/tag/v2.284.0

* Fix lint

* Fix env of docker action.yml

* Test calling a local docker action from composite

With input context hirachy

* local-action-dockerfile Test pass on action/runner

It seems action/runner ignores overrides of args,
if the target docker action has the args property set.

* Fix exec permissions of docker-local-noargs

* Revert getStepsContext change

* fix: handle composite action on error and continue

This change is a follow up of nektos/act#840
and integrates with nektos/act#793

There are two things included here:

- The default value for a step.if in an action need to be 'success()'
- We need to hand the error from a composite action back to the
  calling executor

Co-authored-by: Björn Brauer <[email protected]>

* Patch inputs can be bool, float64 and string
for workflow_call
Also inputs is now always defined, but may be null

* Simplify cherry-picked commit

* Minor style adjustments

* Remove chmod +x from tests

now fails on windows like before

* Fix GITHUB_ACTION_PATH some action env vars

Fixes GITHUB_ACTION_REPOSITORY, GITHUB_ACTION_REF.

* Add comment to CompositeRestrictions

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
underth-moon99 added a commit to underth-moon99/act that referenced this pull request Jul 29, 2025
* Feature: uses in composite

* Negate logic

* Reduce complexity

* Update step_context.go

* Update step_context.go

* Update step_context.go

* Fix syntax error in test

* Bump

* Disable usage of actions/setup-node@v2

* Bump

* Fix step id collision

* Fix output command workaround

* Make secrets context inaccessible in composite

* Fix order after adding a workaround (needs tests)

Fixes nektos/act#793 (comment)

* Evaluate env before passing one step deeper

If env would contain any inputs, steps ctx or secrets there was undefined behaviour

* [no ci] prepare secret test

* Initial test pass inputs as env

* Fix syntax error

* extend test also for direct invoke

* Fix passing provided env as composite output

* Fix syntax error

* toUpper 'no such secret', act has a bug

* fix indent

* Fix env outputs in composite

* Test env outputs of composite

* Fix inputs not defined in docker actions

* Fix interpolate args input of docker actions

* Fix lint

* AllowCompositeIf now defaults to true

see https://github.com/actions/runner/releases/tag/v2.284.0

* Fix lint

* Fix env of docker action.yml

* Test calling a local docker action from composite

With input context hirachy

* local-action-dockerfile Test pass on action/runner

It seems action/runner ignores overrides of args,
if the target docker action has the args property set.

* Fix exec permissions of docker-local-noargs

* Revert getStepsContext change

* fix: handle composite action on error and continue

This change is a follow up of nektos/act#840
and integrates with nektos/act#793

There are two things included here:

- The default value for a step.if in an action need to be 'success()'
- We need to hand the error from a composite action back to the
  calling executor

Co-authored-by: Björn Brauer <[email protected]>

* Patch inputs can be bool, float64 and string
for workflow_call
Also inputs is now always defined, but may be null

* Simplify cherry-picked commit

* Minor style adjustments

* Remove chmod +x from tests

now fails on windows like before

* Fix GITHUB_ACTION_PATH some action env vars

Fixes GITHUB_ACTION_REPOSITORY, GITHUB_ACTION_REF.

* Add comment to CompositeRestrictions

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Ryan <[email protected]>
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

size/XL stale-exempt Exempt from stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue: Bug running composite actions Using "uses" inside composite action

7 participants