Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger workflow_dispatch requires users to pass GITHUB_TOKEN #181

Open
SebastianMorawiec opened this issue Jul 31, 2023 · 0 comments
Open

Comments

@SebastianMorawiec
Copy link

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:

if (!githubToken) {

(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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant