We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Would be good to show why/when you should/could use this action instead of the ternary hack
steps: - uses: actions/checkout@v3 - run: npm run build ${{ inputs.production && '--production' || '' }} # => adds '--production' if box is checked, '' if not
Other good things that could be linked to:
Want to explain and answer this question: Why would a user use this:
steps: - uses: haya14busa/action-cond@v1 id: condval with: cond: ${{ github.event_name == 'pull_request' }} if_true: "value for pull request event" if_false: "value for non pull request event" - name: Use conditional value run: echo "${{ steps.condval.outputs.value }}"
instead of this?
steps: - run: echo "$VALUE" env: VALUE: | ${{ github.event_name == 'pull_request' && 'value for pull request event' || 'value for non pull request event }}
Something like "if you have a lot of chained if conditions this action is a good fit for you" or something would be quite helpful.
The text was updated successfully, but these errors were encountered:
Especially considering GitHub officially documents this feature as "ternary operator like behavior" (src):
Sorry, something went wrong.
No branches or pull requests
Would be good to show why/when you should/could use this action instead of the ternary hack
Other good things that could be linked to:
Want to explain and answer this question: Why would a user use this:
instead of this?
Something like "if you have a lot of chained if conditions this action is a good fit for you" or something would be quite helpful.
The text was updated successfully, but these errors were encountered: