Replies: 5 comments
-
Hmm, interesting. Not seen that so far. The solution you propose seems not to be the solver as this is how the Worklflow is already configured: https://github.com/green-coding-solutions/green-metrics-tool/blob/981e646b5753fd22144b92445571b3ca762f6bc2/.github/workflows/tests-vm-pr.yml#L10 Currently I do not have any idea here. Will look at it next week. Thanks for raising the issue! |
Beta Was this translation helpful? Give feedback.
-
The GitHub Actions Docs states that the "Maximum access for pull requests from public forked repositories" is read. A proposed solution is to use the
However, there are security concerns using the
As Eco CI is usually used in CI pipelines where builds are done, I guess it would be problematic to propose using the A better solution seems to be splitting the pipeline into two parts: one with the safe |
Beta Was this translation helpful? Give feedback.
-
we had The option of having a separate pipeline I do not really see as users than have to create multiple workflow files and/or multiple jobs. The complaints are already that integration Eco CI involves quite some boilerplate text in the .yml files. I do not really have an idea on how to proceed here tbh ... leaving this open. Might be moved to a discussion if no further input happens |
Beta Was this translation helpful? Give feedback.
-
@ribalba do you have an idea how to solve this? you were looking into the |
Beta Was this translation helpful? Give feedback.
-
So I looked into this and I don't think it is possible without "compromising" the keys. I got something working with "allowing" a run by one of the maintainers but then every run needs to be triggered. There is no way of only having this for external runs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
The GitHub Action fails to create PR comments with the measurement results due to a 403 permission error when triggered by external pull requests (from forks). If understand it correctly, it works fine for repository admins/collaborators but fails for external contributors due to restricted
github.token
permissions on fork-based PRs.Error
Example run: https://github.com/green-coding-solutions/green-metrics-tool/actions/runs/15945237760/job/44978437919
Possible Solution
Add explicit permissions to the workflow to handle external pull requests:
Docs: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
Beta Was this translation helpful? Give feedback.
All reactions