Closed ButterscotchV closed 1 year ago
I have also encountered this issue.
Running a workflow with debug logging enabled shows that the if condition for the upload-logs step always gets evaluated to a truthy string:
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: (success() && format('{0} == "true"', inputs.debug))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating format:
##[debug]....Evaluating String:
##[debug]....=> '{0} == "true"'
##[debug]....Evaluating Index:
##[debug]......Evaluating inputs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'debug'
##[debug]....=> 'false'
##[debug]..=> 'false == "true"'
##[debug]=> 'false == "true"'
##[debug]Expanded: (true && 'false == "true"')
##[debug]Result: 'false == "true"'
##[debug]Starting: run
I've opened a PR to fix this: #87.
Just gonna note quickly that #87 does not fully resolve this issue, as the first bullet will still be incorrect since inputs.version
is resolved to true
, which is odd.
@ButterscotchV Thanks for noting this. I've removed "Fixes #86" from the PR and commit message so that it won't close this issue if merged.
Sorry for the lag. Going through backlog right now and issued a new patch v1.2.3 that rolled up the PR here. Also working through a fix for #84; ongoing work is in the dev
branch.
@ButterscotchV could you clarify what you mean about inputs.version
evaluating to true
? AFAIK, version bumps have forced cache updates properly.
I'm really not sure if it's a problem, but just at quick observation from the GitHub Actions output, it looks like it's resolving to true
rather than 1.0
as I'd expect as I've defined in my workflow file.
Hopefully these screenshots can show what I mean a little better, you can see I have the version set to 1.0
but the output is true
. I'm assuming it may be getting evaluated as a boolean, as if 1.0
were to be evaluated as a boolean, you would see true
as the output.
Here are screenshots presented in the same order as I listed them in the issue: From the GitHub Actions run: From the actions.yml file in this repo: From the GitHub Actions workflow file on my repo:
The first screenshot is for the post_cache_action.sh
and the other is for pre_cache_action.sh
. 😸
Ah yep, you're quite right on that, it looks like it's working fine if I'm actually looking at the right one lol. Everything looks all good now, thank you!
No problem. 👍
The workflow file related to this issue can be found at https://github.com/SlimeVR/SlimeVR-Server/actions/runs/3911317186/workflow This workflow is being run on the
ubuntu-20.04
container withawalsh128/cache-apt-pkgs-action@latest
.I'm unsure what the cause of this is, but you can see it at:
corresponding to this part of the action.yml file:
and you can see the actual values of the variables set here in the workflow file:
debug: false
is set in the workflow file explicitly, and is even false by default in this action. You can note in my first bullet that the corresponding value fordebug
seems to be printed astrue
?