Use token secret for docker build
This commit is contained in:
parent
bbe065deae
commit
d43f503474
3 changed files with 5 additions and 4 deletions
|
|
@ -17,7 +17,8 @@ COPY go.sum .
|
|||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN make clean install assets build
|
||||
RUN make clean install assets
|
||||
RUN AUDI_HASH_SECRET={{ env "AUDI_HASH_SECRET" }} make build
|
||||
|
||||
#
|
||||
# STEP 2 build a small image including module support
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ RUN go mod download
|
|||
|
||||
COPY . .
|
||||
RUN make clean install assets
|
||||
RUN GOARCH={{ .GoARCH }} GOARM={{ .GoARM }} make build
|
||||
RUN GOARCH={{ .GoARCH }} GOARM={{ .GoARM }} AUDI_HASH_SECRET={{ env "AUDI_HASH_SECRET" }} make build
|
||||
|
||||
#############################
|
||||
## STEP 2 build a small image
|
||||
|
|
|
|||
|
|
@ -133,8 +133,8 @@ func (v *Audi) authFlow() error {
|
|||
})
|
||||
|
||||
var hash string
|
||||
var secret []byte
|
||||
if secret, err = hex.DecodeString(AudiHashSecret); err == nil {
|
||||
secret, err := hex.DecodeString(AudiHashSecret)
|
||||
if err == nil {
|
||||
// timestamp rounded to 100s precision
|
||||
ts := strconv.FormatInt(time.Now().Unix()/100, 10)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue