ahmadnassri / action-dependabot-auto-merge

Automatically merge Dependabot PRs when version comparison is within range
MIT License
341 stars 48 forks source link

Issue with github-token #207

Open steven-murray opened 1 year ago

steven-murray commented 1 year ago

Thanks for this nice action! However, I am currently having trouble with my auto-merge workflow. It is giving the following error:

/action/node_modules/@actions/core/lib/core.js:106
        throw new Error(`Input required and not supplied: ${name}`);
              ^

Error: Input required and not supplied: github-token
    at Object.getInput (/action/node_modules/@actions/core/lib/core.js:106:15)
    at file:///action/index.js:28:15
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

See https://github.com/steven-murray/cosmotile/actions/runs/4305035435/jobs/7512149111 for example. I do have github-token set, and I have an Actions Secret defined.

morey-tech commented 1 year ago

I ran into this error when the github-token supplied to the action didn't exist. Fixing the token reference fixed it.

steven-murray commented 1 year ago

Hmm, well that would make sense! But as far as I can tell, my token points to a secret that definitely exists. Unless it's case-sensitive.

lpgera commented 1 year ago

@steven-murray Instead of specifying the secret as an Action secret, try it as a Dependabot secret! That worked for me.

steven-murray commented 1 year ago

Thanks @Ipgera that worked for me too. Probably this should be added to the docs...

AndyHoang commented 10 months ago

Doc was removed in https://github.com/ahmadnassri/action-dependabot-auto-merge/issues/58#issuecomment-1718751371