-
Notifications
You must be signed in to change notification settings - Fork 16
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
ci: DOC-228: Docs PR preview action #1107
Conversation
@@ -14,31 +24,34 @@ jobs: | |||
- name: Checkout | |||
uses: actions/checkout@v4 | |||
|
|||
- name: Check file existence | |||
- name: Check JS existence | |||
if: ${{ inputs.js == 'true' }} |
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.
Why is this checking against the string 'true'
instead of just checking inputs.js
? Seems like this should be a boolean
based on the type, not a string
.
https://docs.github.com/en/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#inputs
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.
The boolean flag is a lie (or at least was and Github just hangs when I try to load more to see what the actual resolution of this ticket was) See here
I'm 99% sure it's still a string value and the boolean just helps with documentation or for manual dispatch actions it shows a checkbox.
id: check_files | ||
uses: andstor/file-existence-action@v3 | ||
with: | ||
files: 'plugins/${{ inputs.package }}/src/js/package.json' | ||
|
||
- name: Setup Node | ||
if: steps.check_files.outputs.files_exists == 'true' | ||
id: setup-node | ||
if: ${{ inputs.js == 'true' && steps.check_files.outputs.files_exists == 'true' }} |
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.
Though I see this checks .files_exists
against 'true'
as well, and that matches the documentation: https://github.com/andstor/file-existence-action
Don't get why it's not a bool...
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.
It actually turns inputs/outputs into environment variables, so they're always strings
Tested on my fork (note the uploads failed so the links in the PR will 404). See PR here