benchmark-action / benchmark-action/github-action-benchmark

Trigger workflow_dispatch requires users to pass GITHUB_TOKEN

Open
#181 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.