-
Notifications
You must be signed in to change notification settings - Fork 35
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
Fix if condition for upload-logs step #87
Fix if condition for upload-logs step #87
Conversation
Here is a workflow I created to test this PR: https://github.com/lihop/cache-apt-pkgs-action/blob/test/.github/workflows/test.yml. In this run before the patch, it uploads logs for both steps despite only one having debugging enabled. |
Previously the if condition was always evaluating to a truthy string (e.g. 'false == "true"' or 'true == "true"') as the string comparison (`== 'true'`) was not inside the expression syntax (`${{ }}`) and thus being treated as a string rather than being evaluated.
681aa77
to
0ef6349
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving because this matches the format used throughout GitHub docs:
if: ${{ vars.USE_VARIABLES == 'true' }}
https://docs.github.com/en/actions/learn-github-actions/variables
Thanks for the PR! I usually pull these into staging first but this is really straight forward. Going to roll this into a few more outstanding things before a new release. Let me know if you need it sooner. |
* Fix if condition for upload-logs step (#87) Previously the if condition was always evaluating to a truthy string (e.g. 'false == "true"' or 'true == "true"') as the string comparison (`== 'true'`) was not inside the expression syntax (`${{ }}`) and thus being treated as a string rather than being evaluated. * Introduce a force update value for reloading cache #82 --------- Co-authored-by: Leroy Hopson <github@leroy.geek.nz>
* Address block style package issue #84 #88 * Use cache key for upload artifact name #89. * Sync master back to dev. (#92) * Fix if condition for upload-logs step (#87) Previously the if condition was always evaluating to a truthy string (e.g. 'false == "true"' or 'true == "true"') as the string comparison (`== 'true'`) was not inside the expression syntax (`${{ }}`) and thus being treated as a string rather than being evaluated. * Introduce a force update value for reloading cache #82 --------- Co-authored-by: Leroy Hopson <github@leroy.geek.nz> --------- Co-authored-by: Leroy Hopson <github@leroy.geek.nz>
Previously the if condition was always evaluating to a truthy string (e.g. 'false == "true"' or 'true == "true"') as the string comparison (
== 'true'
) was not inside the expression syntax (${{ }}
) and thus being treated as a string rather than being evaluated.