geniusyield / smart-order-router

Open-source Smart Order Router framework to connect liquidity from the Genius Yield DEX
https://www.geniusyield.co
Apache License 2.0
57 stars 11 forks source link

[CI] CI build fails in forks #47

Closed 4TT1L4 closed 10 months ago

4TT1L4 commented 11 months ago

Problem:

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:

4TT1L4 commented 10 months ago

We are getting there, but https://github.com/geniusyield/smart-order-router/pull/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 commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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