Skip to content

Commit

Permalink
Update docker build to run on releases and include ephem_template rep…
Browse files Browse the repository at this point in the history
…o using a secret token
  • Loading branch information
NickSwainston committed Mar 21, 2024
1 parent 7e2120f commit a4aec7a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- 'main'
tags:
- '*.*.*'
pull_request:
branches:
- main
Expand All @@ -25,8 +27,27 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
name: Build and push git hash
uses: docker/build-push-action@v5
with:
push: true
tags: nickswainston/meerpipe:latest
secrets: |
"ozgrav_repo_token=${{ secrets.OZGRAV_REPO_TOKEN }}"
tags: nickswainston/meerpipe:${{ github.sha }}
-
name: Build and push latest
uses: docker/build-push-action@v5
with:
push: true
secrets: |
"ozgrav_repo_token=${{ secrets.OZGRAV_REPO_TOKEN }}"
tags: nickswainston/meerpipe:latest
-
name: Build and push release
uses: docker/build-push-action@v5
if: github.event_name == 'release'
with:
push: true
secrets: |
"ozgrav_repo_token=${{ secrets.OZGRAV_REPO_TOKEN }}"
tags: nickswainston/meerpipe:${{ github.ref_name }}
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ RUN cd $PSRCHIVE_DIR && \
make install && \
make clean

# 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
WORKDIR $PSRHOME/meertime_ephemerides_and_templates
RUN pip install .


COPY . $PSRHOME/meerpipe
WORKDIR $PSRHOME/meerpipe
Expand Down

0 comments on commit a4aec7a

Please sign in to comment.