github-action-benchmark icon indicating copy to clipboard operation
github-action-benchmark copied to clipboard

Trigger workflow_dispatch requires users to pass GITHUB_TOKEN

Open SebastianMorawiec opened this issue 2 years ago • 0 comments

I've tried using github-action-benchmark workflow with workflow_dispatch trigger, but for security reasons I do not want to pass secrets.GITHUB_TOKEN as input argument to github-token.

Due to the change done here: https://github.com/benchmark-action/github-action-benchmark/pull/74/files

If the workflow trigger is not or , the benchark-workflow tried to use GITHUB_TOKEN to parse some commit information. If no GITHUB_TOKEN is provided, it asserts out Details of the root-cause: https://github.com/benchmark-action/github-action-benchmark/blob/deaf0e0f02808664480ed5bdd31f175936e1fb81/src/extract.ts#L300 (github.context.payload.head_commit is only set on push trigger)

The commit context should be either:

  1. Being figured out based on the payload available in workflow_dispatch trigger
  2. Or I should be able to pass the input to omit this data entirely

SebastianMorawiec avatar Jul 31 '23 13:07 SebastianMorawiec