Skip to content

Commit

Permalink
Try to use build-args to pass secret
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSwainston committed Mar 21, 2024
1 parent a4aec7a commit c334491
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,5 @@ jobs:
if: github.event_name == 'release'
with:
push: true
secrets: |
"ozgrav_repo_token=${{ secrets.OZGRAV_REPO_TOKEN }}"
build-args: "OZGRAV_REPO_TOKEN=${{ secrets.OZGRAV_REPO_TOKEN }}"
tags: nickswainston/meerpipe:${{ github.ref_name }}
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM ubuntu:22.04

ARG OZGRAV_REPO_TOKEN

# Install dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
Expand Down Expand Up @@ -258,7 +260,7 @@ RUN cd $PSRCHIVE_DIR && \

# Download and install private ephem_template repo
WORKDIR $PSRHOME
RUN git clone https://$(cat /run/secrets/ozgrav_repo_token)@github.com/OZGrav/meertime_ephemerides_and_templates.git
RUN git clone https://${OZGRAV_REPO_TOKEN}@github.com/OZGrav/meertime_ephemerides_and_templates.git
WORKDIR $PSRHOME/meertime_ephemerides_and_templates
RUN pip install .

Expand Down

0 comments on commit c334491

Please sign in to comment.