chrnorm/deployment-status

Resource not accessible by integration

selfagency opened this issue · 2 comments

For some reason, starting a deployment works fine, but updating a deployment fails for me

      - name: Finalize GitHub deployment
        uses: chrnorm/deployment-status@releases/v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          state: ${{ steps.status.outputs.status }}
          deployment_id: ${{ needs.setup.outputs.deployment_id }}
Run chrnorm/deployment-status@releases/v1
  with:
    token: ***
    state: failure
    deployment_id: 51057
  env:
    ENVIRONMENT: staging
    BACKEND: true
    FRONTEND: true
    DISPATCH: true
Error: HttpError: Resource not accessible by integration
Error: Resource not accessible by integration

While an old post, we encountered this issue today.

Root cause was that we had to set some other permissions for our action. Per the docs (https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions), this results in:

If you specify the access for any of these scopes, all of those that are not specified are set to none.

We were able to resolve this issue by setting (on the job):

permissions:
  deployments: write

i wound up using bobheadxi/deployment instead