How to configure Paketo go builder?

I’m trying to use a private repo and found the following documentation How to Build Go Apps with Paketo Buildpacks - Paketo Buildpacks but I don’t know how to pass those arguments in my fly.toml

Is this possible? Thanks! :slight_smile:

For eventual future readers: my solution was to write a Dockerfile to build and run the app instead of using Paketo. The tricky part (at least to me, since I don’t use Docker) was securely setting up the private repo access in the Dockerfile:

RUN go env -w*

RUN --mount=type=secret,id=GITHUB_TOKEN,required \
    GITHUB_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" \
    && git config --global url."https://${GITHUB_TOKEN}".insteadOf ""

Then you can set GITHUB_TOKEN when deploying:

fly deploy --build-secret GITHUB_TOKEN=${GITHUB_TOKEN}

Please let me know if there is a better approach! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.