Skip to content

Commit

Permalink
Update: Ensure docker build fails without AUTH_TOKEN build arg
Browse files Browse the repository at this point in the history
Since the `GITHUB_TOKEN` being used as the environment variable in
the docker image was needed (and not optional) - allowing docker
builds to succeed, only to result in a crash when the container was
run would be a waste of time.

With this commit, the `AUTH_TOKEN` argument is mandatory for the
`docker build` command to succeed. This greatly cuts down the
response time to detect an error with the build command
  • Loading branch information
notsatan committed Oct 22, 2021
1 parent 98cf14a commit e3b3dfb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN mkdir /silver-surfer
WORKDIR /silver-surfer
ADD . /silver-surfer/
ARG AUTH_TOKEN
RUN test -n "$AUTH_TOKEN"
ENV GITHUB_TOKEN=${AUTH_TOKEN}
ARG RELEASE
RUN if [ "$RELEASE" = "goreleaser" ]; then echo `make release`; fi
Expand Down

0 comments on commit e3b3dfb

Please sign in to comment.