taiki-e / upload-rust-binary-action

GitHub Action for building and uploading Rust binary to GitHub Releases.
Apache License 2.0
246 stars 22 forks source link

Error: `403: Resource not accessible by integration` #15

Closed elsuizo closed 2 years ago

elsuizo commented 2 years ago

Hi i want to use this to pack a substrate node but i got:

HTTP 403: Resource not accessible by integration

Any idea what could be wrong?

this is my yml configuration file:

https://github.com/elsuizo/substrate-node-packaging-test/blob/main/.github/workflows/release-binary.yml

Thanks in advance

taiki-e commented 2 years ago

One possibility is that write permission of GITHUB_TOKEN is missing.

Adding the following two lines to the workflow or changing the default permissions for the repository to "read and write permissions" (see the second section of this post) may fix the problem.

permissions:
  contents: write
elsuizo commented 2 years ago

Solved, Thanks for your time!!!

ThreeDeeJay commented 3 months ago

@taiki-e Any idea why setting permissions: contents: write still fails here? The same happens when setting permissions: write-all.

Oddly enough, after removing --target COMMITHASH it works but I'm trying to create retroactive releases linked to their respective commit, so I really need to pass that argument, and I even tried setting that branch as default so I'm not sure what I'm missing.

 --target <branch> 
    Target branch or full commit SHA (default [main branch])

I was able to run the exact same commands while logged in on my PC and it worked, so I suspect this may be a limitation of the GitHub Actions token permissions, but then again, it's already set to read+write in the workflow and in the repo's Settings > Actions > General > Workflow permissions 🤔