diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index 964959f..81b6ef1 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -4,6 +4,8 @@ on: push: branches: - 'main' + tags: + - '*.*.*' pull_request: branches: - main @@ -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 \ No newline at end of file + 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 }} diff --git a/Dockerfile b/Dockerfile index 7abf77e..6b9f3bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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