tailscale / github-action

A GitHub Action to connect your workflow to your Tailscale network.
BSD 3-Clause "New" or "Revised" License
532 stars 80 forks source link

action.yml: support OAuth clients in addition to authkeys #71

Closed DentonGentry closed 1 year ago

DentonGentry commented 1 year ago

Fixes https://github.com/tailscale/github-action/issues/59

DentonGentry commented 1 year ago

I'd especially like suggestions on the names of arguments, as we can basically never change them once merged.

  - name: Tailscale
    uses: tailscale/github-action@v2
    with:
      oauth_client_id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
      oauth_secret: ${{ secrets.TS_OAUTH_SECRET }}
      oauth_tags: tag:ci

The action doesn't really need the client-id, but if we don't provide a way to pass it I think we'll get a never-ending series of issues filed asking what people are supposed to do with the client-id. The argument is marked as optional and not checked for. If omitted, the action will still run.

The oauth_tags argument could conceivably be named just tags, but it does have to match the Tags configured in the OAuth client.

wjrogers commented 1 year ago

I'd especially like suggestions on the names of arguments, as we can basically never change them once merged.

My two cents as a user: kebab-case is far more common in official and other high-profile GitHub Actions. I would like to see this for consistency:

  - name: Tailscale
    uses: tailscale/github-action@v2
    with:
      oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
      oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
      tags: tag:ci
DentonGentry commented 1 year ago

Good observation about underscores vs dashes, updated the inputs to use dashes.