microbiomedata / nmdc-runtime

Runtime system for NMDC data management and orchestration
https://microbiomedata.github.io/nmdc-runtime/
Other
4 stars 3 forks source link

Authenticate as workflow triggerer instead of as repo owner #566

Closed eecavanna closed 1 week ago

eecavanna commented 1 week ago

This is an attempt to fix the HTTP 403 Forbidden error that occurred in this GHA workflow run, which was triggered by the merging of PR https://github.com/microbiomedata/nmdc-runtime/pull/565.

Error: buildx failed with: ERROR: failed to solve: failed to push ghcr.io/microbiomedata/nmdc-runtime-fastapi:main: failed commit on ref "manifest-sha256:***": unexpected status from PUT request to https://ghcr.io/v2/microbiomedata/nmdc-runtime-fastapi/manifests/sha256:***: 403 Forbidden

In this branch, I configured the GHA workflow step to authenticate with GHCR as the user triggering the workflow instead of as the repository owner. This makes it consistent with how it is done in nmdc-server and nmdc-edge (it works in those repo)—instead of consistent with the Docker documentation (which I had never tried before).

eecavanna commented 1 week ago

Merging without review. This is an attempt to fix GitHub Actions and is not trivial for me to test by means other than merging into main.