mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2426] if condition in composite action misbehaves with uses #1115
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @novascreen on GitHub (Aug 17, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2426
Bug report info
Command used with act
Describe issue
I'm passing a secret as an input to a composite action. In the composite action I want to run a third party action with
usesbased on whether the input is defined or not.When I use an
ifcondition on a shell step it works correctly, however on the step thatusesthe third party action the expression is suddenly evaluated tofalse.Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
My
event.jsononly has base and head refs defined, nothing else.@twonds commented on GitHub (Aug 28, 2024):
I have the same issue and the only condition that seems work is testing for null
if: ! inputs.test-input@doubleforte commented on GitHub (Sep 3, 2024):
I have a similar issue.
This works as expected, and prints out "Works! And this says 'true': true"
However, this next one one errors out:
My guess is that somehow the input is being forgotten, returning a null object or something that causes
fromJSON()to choke on a non-existing value.@ChristopherHX commented on GitHub (Sep 12, 2024):
Regression of https://github.com/nektos/act/pull/2348?
Missing / unreliable tests of the code
@CharlieC3 commented on GitHub (Sep 17, 2024):
I'm seeing the same behavior. My team makes heavy use of composite actions and being able to use this tool would have a significant impact for us.
@ChristopherHX Correct me if I'm wrong, but I believe the tests added in that PR won't detect an issue like this because the problem only surfaces when an
ifcondition which uses inputs passed to the current composite action is being used, and the actions added in the testdata dir do not set such a condition.@ChristopherHX commented on GitHub (Sep 17, 2024):
I meant this bug might has been caused by #2348.
It doesn't read like we have the same impression what I meant.
So a first step to see if reverting that specifc commit works and run go build to get a binary, then verify if my assumption is correct.
Next steps would be to either propose a revert of #2348 and rerelease act or figure out to solve both the defect that PR aimed to fix and this one.
Downgrading act to a version (GitHub shows tags including the merged commit, just use the one lower) without that change is a temporary consumer solution
I don't expect any resolution this month, my focus is on different projects.
This is on my backlog, my work for act cli is currently slow
@ChristopherHX commented on GitHub (Sep 27, 2024):
Confirmed as Regression due to mergin #2348
called by
I'm working on a fix right now, highest priority issue for act in my backlog.
Issues filed as defects of github-act-runner are processed and merged faster.
@ChristopherHX commented on GitHub (Sep 27, 2024):
E.g.
git revert b5ad3c4acd89cc8a7d1ce8bdb41c16d48b2cdf36 && go buildon current master gives you are more recent act binary without this specfic defect@ChristopherHX commented on GitHub (Sep 27, 2024):
Help wanted to verify: https://github.com/nektos/act/pull/2473, awaiting review this can take unspecified amount of time
Portable Binaries are in CI-Checks Artifacts of that PR, since act is all about GitHub Actions this should be self explaining.