mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
docker: inject GH_TOKEN via BuildKit secret for private mod download
luxfi/corona went private; the Dockerfile builder's `go mod download` was failing with "could not read Username for 'https://github.com'" on the ARC runner. Adds a BuildKit secret mount (required=false so local builds without the secret still work when all deps are public) and rewrites `git config url.insteadOf` to inject the token only for the download step. Token is unset after to keep the layer clean. The workflow passes ${{ secrets.GITHUB_TOKEN }} as the `ghtok` secret; the default GITHUB_TOKEN has repo:read for the runner's repository, which is sufficient for luxfi/corona since it's in the same org.
This commit is contained in:
@@ -52,6 +52,8 @@ jobs:
|
||||
push: true
|
||||
build-args: |
|
||||
CGO_ENABLED=0
|
||||
secrets: |
|
||||
ghtok=${{ secrets.GITHUB_TOKEN }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
provenance: false
|
||||
|
||||
Reference in New Issue
Block a user