Skip to content

Error on PRs from Forks: "unexpected error encounterd: Resource not accessible by integration" #52

Description

@robearlam

We're getting errors when the step runs against PR's issued from Forks. This works fine for PR's from branches in the same repo.

Step we're using is:

      - name: start deployment
        uses: bobheadxi/deployments@v0.4.3
        id: deployment
        with:
          step: start
          token: ${{ secrets.GITHUB_TOKEN }}
          env: ${{ fromJSON('["Production", "Preview"]')[github.ref != 'refs/heads/main'] }} 

You can see an example here: https://github.com/Sitecore/developer-portal/pull/152/checks?check_run_id=3761659282

Seemed related to #32, but I added the fix from there to use the following permissions on the job but it didn't fix it:

permissions: 
  deployments: write

You can see our full GH action definition here: https://github.com/Sitecore/developer-portal/blob/main/.github/workflows/deploy.yml

Example of failed run: https://github.com/Sitecore/developer-portal/pull/152/checks?check_run_id=3761659282

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions