-
Notifications
You must be signed in to change notification settings - Fork 86
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
Split OAuth empty error message to create new absent tags error message #82
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -50,11 +50,17 @@ runs: | |||||
echo "::error title=⛔ error hint::Support Linux Only" | ||||||
exit 1 | ||||||
- name: Check Auth Info Empty | ||||||
if: ${{ inputs.authkey == '' && (inputs['oauth-secret'] == '' || inputs.tags == '') }} | ||||||
if: ${{ inputs.authkey == '' && inputs['oauth-secret'] == '' }} | ||||||
shell: bash | ||||||
run: | | ||||||
echo "::error title=⛔ error hint::OAuth identity empty, Maybe you need to populate it in the Secrets for your workflow, see more in https://docs.github.com/en/actions/security-guides/encrypted-secrets and https://tailscale.com/s/oauth-clients" | ||||||
exit 1 | ||||||
- name: Check Tags Provided | ||||||
if: ${{ inputs.authkey == '' && inputs.tags == '' }} | ||||||
shell: bash | ||||||
run: | | ||||||
echo "::error title=⛔ error hint::At least one ACL tag is required for nodes created by this Action. Ensure an appropriate tag exists in your ACL and provide it in your workflow. See more in https://tailscale.com/kb/1068/acl-tags/" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This error hint is accurate only if the action is authorized via Tailscale OAuth client--not if an auth key is used instead. Validity of a tag, like the suitability of the set of tags provided via the sometimes-required I suggest wording the message so as to guide the user to providing input parameters which satisfy the requirements for this action as they are documented on its GitHub Marketplace page.
Suggested change
|
||||||
exit 1 | ||||||
- name: Download Tailscale | ||||||
shell: bash | ||||||
id: download | ||||||
|
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.
This Action supports two styles of keys:
inputs.authkey = 'tskey-...'
for an original authkey, tied to a User.inputs['oauth-secret'] = '...'
for an OAuth client, from whichtailscaled
will allocate an authkey to use for itself.A inputs.tags is required if inputs['oauth-secret'] is set. As written, this PR uses
inputs.authkey == ''
to mean "inputs['oauth-secret'] must not be empty or we wouldn't have gotten this far."I'd suggest instead: