action icon indicating copy to clipboard operation
action copied to clipboard

[FR] Make another action `CodSpeedHQ/setup-codspeed`

Open webknjaz opened this issue 2 months ago • 2 comments

I have a use-case where I'd like to have the codspeed executable made available (perhaps also pre-authenticated) but then I'd need to call it myself in a way that this action can't (in my own wrappers). I've filed https://github.com/CodSpeedHQ/runner/issues/135 and it'd help me solve this on one level but I believe that this action would also need bit of refurb in the context of GHA traditions.

GitHub has official recommendation for making actions that expose CLI tools in workflow jobs that suggest using the setup-$TOOL pattern or naming. All their official actions follow this principle (actions/setup-python, actions/setup-node etc.), and also third parties aren't that far behind (astral-sh/setup-uv).

See: https://docs.github.com/en/actions/how-tos/create-and-publish-actions/create-a-cli-action.

This is basically what I'd like the action to do:

  1. Self-bootstrapping (making codspeed available on $PATH)
  2. Optional caching if applicable.
  3. Optional call to codspeed auth for saving the token in a config on disk.
  4. Never invoking codspeed run
  5. During teardown, remove the token from disk (runs.post requires the action to be JS-based, though: https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#runspost)

webknjaz avatar Oct 20 '25 14:10 webknjaz

This would have been useful for my use case: I have a repository with multiple Go modules and as such I need to repeatedly run codspeed run for multiple Go modules.

You can see my current attempt at a workaround (mostly just copying things from the implementation of this action) over at open-telemetry/opentelemetry-collector/pull/14160

mx-psi avatar Nov 13 '25 13:11 mx-psi

Honestly, I have other problems with this, like invoking an unversioned script from the internet..

webknjaz avatar Nov 13 '25 20:11 webknjaz