testdrivenio / fastapi-tdd-docker

Test-Driven Development with FastAPI and Docker
165 stars 49 forks source link

write permission issue, GithubAction #35

Closed jihobak closed 9 months ago

jihobak commented 1 year ago

In the step, 'Push image' I got error like below.

denied: installation not allowed to Write organization package
Error: Process completed with exit code 1.
This issue is related with the permission. here are some guides

There links are related with this issue.

I fixed error like below

name: Continuous Integration and Delivery

on: [push]

permissions: write-all

...

But, here's my question: How Can I solve this with this issue by controlling a single job? is it impossible?

At first, I though I can solve this issue with below code but it failed. So, That's why I changed the entire permission like the above.

jobs:

  build:
    name: Build Docker Image
    runs-on: ubuntu-latest
    permissions:
      packages: write

Is there any suggestion?