-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Implement support for private deps via GOPRIVATE & GH PAT (#21)
* ✨ Defined Build Args * ✨ Passing args from ENV * 🔧 Escaping * Issue with escaping * 🔧 Moved config to correct place * ✨ Just wanting Token now * 🐛 Using add flag * 🐛 Corrected default value type * 🐛 Mixed up states * 🚧 Investigate weird behaviour * 🚧 Print GOPRIVATE * 🐛 Using correct config override * ✨ Finalized Feature * 📝 Documented feature * 📝 Added missing link
Showing
4 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,11 @@ FROM golang:$GOLANG_VERSION | |
ARG VULNCHECK_VERSION=latest | ||
RUN go install golang.org/x/vuln/cmd/govulncheck@$VULNCHECK_VERSION | ||
|
||
ARG GH_PAT_TOKEN | ||
RUN if [[ -n "$GH_PAT_TOKEN" ]]; then echo "No token was provided"; else git config --global --add url."https://govulncheck_action:[email protected]/".insteadOf "https://github.com/"; fi | ||
|
||
ARG GOPRIVATE | ||
ENV GOPRIVATE=$GOPRIVATE | ||
|
||
COPY --from=builder /go/src/github.com/Templum/govulncheck-action/action /action | ||
ENTRYPOINT ["/action"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters