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

[CI] CI build fails in forks #47

Closed
4TT1L4 opened this issue Nov 1, 2023 · 4 comments
Closed

[CI] CI build fails in forks #47

4TT1L4 opened this issue Nov 1, 2023 · 4 comments
Assignees
Labels
Configuration A change to config files, deployments and/or dependencies. Priority - High Issue has high priority and has to be worked, if no blocker issues are being worked on. T-Shirt size - Small High-Level effort estimation. Category "lowest effort". Task A feature request or general task involving code changes.

Comments

@4TT1L4
Copy link
Contributor

4TT1L4 commented Nov 1, 2023

Problem:

  • The CI build fails for fork repositories.
buildx failed with: ERROR: failed to solve: failed to push ghcr.io/geniusyield/smart-order-router:latest: unexpected status from POST request to https://ghcr.io/v2/geniusyield/smart-order-router/blobs/uploads/: 403 Forbidden

Solution:

  • Make sure to push to the right container registry and don't try to push the container image to the GeniusYield GitHub Container Registry, since this is going to fail when attempted from repository forks.
@4TT1L4 4TT1L4 self-assigned this Nov 1, 2023
@4TT1L4 4TT1L4 added Configuration A change to config files, deployments and/or dependencies. Priority - High Issue has high priority and has to be worked, if no blocker issues are being worked on. T-Shirt size - Small High-Level effort estimation. Category "lowest effort". Task A feature request or general task involving code changes. labels Nov 1, 2023
4TT1L4 added a commit that referenced this issue Nov 1, 2023
4TT1L4 added a commit that referenced this issue Nov 1, 2023
4TT1L4 added a commit that referenced this issue Nov 1, 2023
@4TT1L4
Copy link
Contributor Author

4TT1L4 commented Nov 6, 2023

We are getting there, but #48 did not solve the issue.

Now we are getting a different error message in the repository forks:
https://github.com/4TT1L4/smart-order-router/actions/runs/6768359183

buildx failed with: ERROR: invalid tag "ghcr.io/4TT1L4/smart-order-router:latest": repository name must be lowercase

@4TT1L4
Copy link
Contributor Author

4TT1L4 commented Nov 6, 2023

It turns out that the docker/metadata-action action can handle repository naming.

We just need to use it.

Implemented in the following PR:

4TT1L4 added a commit that referenced this issue Nov 6, 2023
4TT1L4 added a commit that referenced this issue Nov 6, 2023
4TT1L4 added a commit that referenced this issue Nov 6, 2023
4TT1L4 added a commit that referenced this issue Nov 6, 2023
4TT1L4 added a commit that referenced this issue Nov 6, 2023
4TT1L4 added a commit that referenced this issue Nov 6, 2023
4TT1L4 added a commit that referenced this issue Nov 6, 2023
4TT1L4 added a commit that referenced this issue Nov 7, 2023
@4TT1L4
Copy link
Contributor Author

4TT1L4 commented Nov 7, 2023

Now the build is working in the fork repositories, but the image tagging is a bit off.

I have created a new fix to tag the images build from main with latest:

4TT1L4 added a commit that referenced this issue Nov 7, 2023
@4TT1L4
Copy link
Contributor Author

4TT1L4 commented Nov 7, 2023

Now the tagging is also working. The image build from the main branch is tagged with latest.

We might need a more sophisticated tagging and release process in the future, but for now the bare minimum should be fine.

I have tested this in my own fork of the repository:
https://github.com/4TT1L4/smart-order-router/pkgs/container/smart-order-router

Image

See the following GitHub Actions run for details:
https://github.com/4TT1L4/smart-order-router/actions/runs/6782570186

@4TT1L4 4TT1L4 closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration A change to config files, deployments and/or dependencies. Priority - High Issue has high priority and has to be worked, if no blocker issues are being worked on. T-Shirt size - Small High-Level effort estimation. Category "lowest effort". Task A feature request or general task involving code changes.
Projects
None yet
Development

No branches or pull requests

1 participant