Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticate as workflow triggerer instead of as repo owner #566

Conversation

eecavanna
Copy link
Collaborator

@eecavanna eecavanna commented Jun 19, 2024

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 #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 eecavanna self-assigned this Jun 19, 2024
@eecavanna eecavanna requested a review from dwinston June 19, 2024 20:59
@eecavanna
Copy link
Collaborator Author

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.

@eecavanna eecavanna merged commit 5c96e12 into main Jun 19, 2024
@eecavanna eecavanna deleted the 564-publish-container-images-to-github-container-registry-ghcr-instead-of-docker-hub branch June 19, 2024 21:05
@eecavanna eecavanna linked an issue Jun 19, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Publish container images to GitHub Container Registry (GHCR)
1 participant