-
Notifications
You must be signed in to change notification settings - Fork 486
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
Same Github Action works on push but not on pull_request_review #443
Comments
Hi there @spring1843, I tested this out in a private repo and it's working for me. Here's my configuration:
I tested this on both
|
Some more info:
Basically you shouldn't be hitting the code that's outputting this error if your environment is what we expect. |
After further digging, it looks like GitHub simply doesn't populate the environment variables necessary to do OIDC authentication if the GitHub actions token running the job doesn't have the correct permissions to write to the JWT. GitHub's documentation says that in order to perform OIDC, the Note that this also means that OIDC cannot work on forks (see #373). The |
I'm now realizing that in my use case where PRs are made to the main repo from a fork (because the main repo does not allow contributors to push branches to the main repo which is a common practice many projects) and where the workflow is triggered on |
Our work around for this was to use a secondary Github Action Workflow that is triggered on workflow_run. This second GA will authenticate properly however it will not have access to the event data from the first workflow such as PR number or tag. In case the second workflow needs to have that data then the first workflow can package and upload it as an artifact and the second workflow will be able to download and use it. |
|
I have an action that runs on both
push
into main andpull_request_review
.The problem I'm seeing is that
configure-aws-credentials
works on push events but fails when triggered by pull_request_review with the messageError: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers
.I have also seen it not working with:
I'm not seeing any specific errors anywhere, on the AWS side I see:
2022-05-13T21:40:01Z 7a625f11-6f05-4634-976d-b5a5cc9f62ff sts.amazonaws.com AssumeRoleWithWebIdentity AccessDenied An unknown error occurred
Here's what the Github Action looks like:
The trust relationship for the role looks like:
The text was updated successfully, but these errors were encountered: