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

Document how to fix 'Reasource not Available by Integration' #443

Open
GabLeRoux opened this issue Dec 14, 2023 · 1 comment
Open

Document how to fix 'Reasource not Available by Integration' #443

GabLeRoux opened this issue Dec 14, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@GabLeRoux
Copy link
Member

GabLeRoux commented Dec 14, 2023

Related issue: game-ci/unity-test-runner#249

Reasource not Available by Integration

This message is related to the following StackOverflow:
https://stackoverflow.com/questions/70435286/resource-not-accessible-by-integration-on-github-post-repos-owner-repo-ac

This happens because the pipeline doesn't have the right to publish the report for the tests.

Option 1: Go in project's settings > Workflow Permissions section and give actions Read and Write permissions.
Option 2: explicitly add the required permissions to the job using this action, e.g.:

jobs:
  test:
    permissions:
      checks: write
...
    steps:
      - name: Run Tests
        uses: game-ci/unity-test-runner@v4

source: game-ci/unity-test-runner#249 (comment)

  1. Identify all example snippets in our docs that would benefit from the permissions. Can be done by searching for "game-ci/unity-test-runner" in the code (yaml snippets).
  2. Update the examples with the permissions check
  3. Document the error, the fix and the permission check somewhere.

The last thing I would like to validate: if we have the permissions checks in the yaml, I suppose we still have to give actions Read and Write permissions, is that right?

@GabLeRoux GabLeRoux added documentation Improvements or additions to documentation good first issue Good for newcomers labels Dec 14, 2023
@asbjornu
Copy link

asbjornu commented Apr 16, 2024

A note on this: If permissions: is added, all default permissions for other actions in the job are reset and will have to be explicitly added back. As mentioned in actions/checkout#254, actions/checkout will stop working since it needs contents: read permissions, for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants