Skip to content

Commit

Permalink
set env variables for username and password by passing build args
Browse files Browse the repository at this point in the history
  • Loading branch information
nam20485 committed Feb 15, 2024
1 parent 8613483 commit a127cef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ jobs:
OWNER=nam20485
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
VCPKG_BINARY_SOURCES=clear;nuget,GitHub,readwrite
ODBDESIGN_SERVER_REQUEST_USERNAME=${{ secrets.ODBDESIGN_SERVER_REQUEST_USERNAME }}
ODBDESIGN_SERVER_REQUEST_PASSWORD=${{ secrets.ODBDESIGN_SERVER_REQUEST_PASSWORD }}
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ LABEL org.opencontainers.image.licenses=MIT
ARG OWNER=nam20485
ARG GITHUB_TOKEN="PASSWORD"
ARG VCPKG_BINARY_SOURCES=""
ARG ODBDESIGN_SERVER_REQUEST_USERNAME=""
ARG ODBDESIGN_SERVER_REQUEST_PASSWORD=""

# install dependencies
RUN apt-get update && \
Expand Down Expand Up @@ -96,5 +98,7 @@ RUN mkdir ./designs

# run
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/OdbDesign/bin
ENV ODBDESIGN_SERVER_REQUEST_USERNAME=${ODBDESIGN_SERVER_REQUEST_USERNAME}
ENV ODBDESIGN_SERVER_REQUEST_PASSOWRD=${ODBDESIGN_SERVER_REQUEST_PASSWORD}
RUN chmod +x ./OdbDesignServer
ENTRYPOINT [ "./OdbDesignServer" ]

0 comments on commit a127cef

Please sign in to comment.