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

Fix "Http Error" when running test reporter action on forked repo #181

Merged
merged 1 commit into from
May 28, 2024

Conversation

Miaaaim
Copy link
Collaborator

@Miaaaim Miaaaim commented May 28, 2024

Error: HttpError: Resource not accessible by integration

see here

Workflows triggered by pull requests from forked repositories are executed with read-only token and therefore can't create check runs. To workaround this security restriction, it's required to use two separate workflows:

CI runs in the context of the PR head branch with the read-only token. It executes the tests and uploads test results as a build artifact
Test Report runs in the context of the repository main branch with read/write token. It will download test results and create reports

The second workflow will only run after it has been merged into your default branch (typically main or master), it won't run in a PR unless after the workflow file is part of that branch.

@Miaaaim Miaaaim requested a review from FriesI23 May 28, 2024 10:15
@Miaaaim Miaaaim added bug Something isn't working CI Contains automated builds, utils scripts, etc. labels May 28, 2024
Copy link
Owner

@FriesI23 FriesI23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@FriesI23 FriesI23 merged commit d33939b into FriesI23:main May 28, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Contains automated builds, utils scripts, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants