You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation does not mention anything about my problem
There are no open or closed issues that are related to my problem
Description
When switching to buildx for multi-arch builds, the action fails when trying to push to ghcr.io with the following error:
failed to push ghcr.io/albertodonato/query-exporter:pr-247: unexpected status from POST request to https://ghcr.io/v2/albertodonato/query-exporter/blobs/uploads/: 403 Forbidden
For reference, this PR has the changes breaking the workflow, which works fine when running without buildx.
Expected behaviour
The action should succeed and upload built images for all arches.
This is something you need to keep in mind when you want to publish images with PR tags with pull_request event triggers to the workflow.
When you do this with a local branch and not a remote one (from someone who is not a member of the project), you will have full token rights like with the main branch, and you can use permissions to restrict that further for the workflow.
Third-party contributors do not have this permission and it cannot be granted for security reasons (as they can alter the workflows that the PR will run). So you must keep in mind that not all PRs will be compatible for this usage.
I'm not 100% sure, but you might be able to re-run the workflow as a project maintainer and that may run with your own token/permissions, allowing it to succeed.
You'd think that GHA would fail earlier instead when the permissions for the job weren't the expected ones you defined explicitly, but that's not something this action can resolve AFAIK? 🤷♂
Contributing guidelines
I've found a bug, and:
Description
When switching to buildx for multi-arch builds, the action fails when trying to push to ghcr.io with the following error:
For reference, this PR has the changes breaking the workflow, which works fine when running without buildx.
Expected behaviour
The action should succeed and upload built images for all arches.
Actual behaviour
Build succeeds but upload fails.
Repository URL
https://github.com/albertodonato/query-exporter
Workflow run URL
https://github.com/albertodonato/query-exporter/actions/runs/13603617943
YAML workflow
Workflow logs
No response
BuildKit logs
Additional info
No response
The text was updated successfully, but these errors were encountered: