-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Describe the bug
Currently the API Token and Global Key share the same variable, so there is a chance that a user will add an API Token and Email, which triggers the Global Key authentication method and fails.
To Reproduce
Steps to reproduce the behavior:
- Set up a repo in GitHub, and API Token in Cloudflare
- Add ACCOUNT_EMAIL, API_TOKEN, and ACCOUNT_ID secrets.
- Attempt to run workflow.
- Error: "Error fetching deployments"
Expected behavior
Login can happen with either the API Key or the Email/Global Key, whether email is set or not.
Global Key should use a different variable name.
Additional context
This issue is caused when ACCOUNT_EMAIL, API_TOKEN, and ACCOUNT_ID are all set up. The presence of ACCOUNT_EMAIL seems to trigger the Global API key authentication approach:
//cloudflare.js:23
const headers = accountEmail
? {
'X-Auth-Key': token,
'X-Auth-Email': accountEmail
}
: {
Authorization: `Bearer ${token}`
}Metadata
Metadata
Assignees
Labels
No labels