-
Notifications
You must be signed in to change notification settings - Fork 5
Description
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 CodSpeedHQ/runner#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:
- Self-bootstrapping (making
codspeedavailable on$PATH) - Optional caching if applicable.
- Optional call to
codspeed authfor saving the token in a config on disk. - Never invoking
codspeed run - During teardown, remove the token from disk (
runs.postrequires the action to be JS-based, though: https://docs.github.com/en/actions/reference/workflows-and-actions/metadata-syntax#runspost)