axodotdev / axodotdev/cargo-dist
Permission to specific hosting job?
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
Currently, dist applies a permission to entire workflow in the head of yml
```yml
name: Release
permissions:
"contents": "write"
```
However, somehow the permission is not applied to `host` job and it failed with the message `HTTP 403: Resource not accessible by integration`.
I manually edited release.yml so that the job `host` have permission directly and it started working.(`allow-dirty` flag is needed to run on CI.)
```diff
# Determines if we should publish/announce
host:
+ permissions:
+ content: write
needs:
- plan
- build-local-artifacts
- build-global-artifacts
```
I do not know if it's a bug in github actions or not but if you have similar problem, this workaround might helps
Contributor guide
Research direction
Start with release.yml and the host job, then reproduce the CI failure using the allow-dirty flag mentioned in the report. Compare workflow-level and host-job permissions, and confirm that the release job completes without the HTTP 403 error after the issue is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100