Skip to content

Commit

Permalink
[wip] trying to fix isis-asp workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chbrandt committed Nov 14, 2023
1 parent 846a5ed commit f38e131
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ jobs:
uses: actions/checkout@v4

- name: Load .env file
uses: xom9ikk/dotenv@v2
run: |
source .env
echo "ISIS_VERSION=${ISIS_VERSION}" >> $GITHUB_ENV
- name: Build image
run: |
Expand All @@ -131,14 +133,15 @@ jobs:
if: ${{ github.event_name == 'push' }}
run: |
NEW_IMAGE=`docker compose config --images ${{ env.SERVICE }}`
echo "docker tag $NEW_IMAGE ${{ env.REPO }}:$GITHUB_REF_NAME"
docker tag $NEW_IMAGE ${{ env.REPO }}:$GITHUB_REF_NAME
- name: Tag 'latest' image
if: ${{ github.ref_type == 'tag' }}
run: |
NEW_IMAGE=`docker compose config --images ${{ env.SERVICE }}`
docker tag $NEW_IMAGE ${{ env.REPO }}:latest
docker tag $NEW_IMAGE ${{ env.REPO }}:${ISIS_VERSION}
docker tag $NEW_IMAGE ${{ env.REPO }}:latest
# DATE=`date +%Y%m%d`
# docker tag $NEW_IMAGE ${{ env.REPO }}:$DATE

Expand Down Expand Up @@ -207,17 +210,27 @@ jobs:
# docker image ls -a

- name: Load .env file
uses: xom9ikk/dotenv@v2
run: |
source .env
echo "ISIS_VERSION=${ISIS_VERSION}" >> $GITHUB_ENV
echo "ASP_VERSION=${ASP_VERSION}" >> $GITHUB_ENV
- name: List images
run: |
docker image ls -a
- name: Build image
run: |
ISIS_IMAGE=${{ env.USER_ORG }}/jupyter-isis:${GITHUB_REF_NAME}
echo "docker compose build --build-arg BASE_IMAGE=${ISIS_IMAGE} ${{ env.SERVICE }}"
docker compose build --build-arg BASE_IMAGE=${ISIS_IMAGE} ${{ env.SERVICE }}
docker rmi $ISIS_IMAGE
- name: Tag image
if: ${{ github.event_name == 'push' }}
run: |
NEW_IMAGE=`docker compose config --images ${{ env.SERVICE }}`
echo "docker tag $NEW_IMAGE ${{ env.REPO }}:$GITHUB_REF_NAME"
docker tag $NEW_IMAGE ${{ env.REPO }}:$GITHUB_REF_NAME
- name: Tag 'latest' image
Expand Down Expand Up @@ -248,3 +261,7 @@ jobs:
| tail -n+2 | awk '{print $1":"$2}'
| grep "${{ env.REPO }}"
| xargs -I'{}' docker push {}
- name: List images
run: |
docker image ls -a
6 changes: 3 additions & 3 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:

jupyter-gispy:
image: gmap/jupyter-gispy}
image: gmap/jupyter-gispy:latest
# environment:
# - JUPYTER_TOKEN='pass'
ports:
Expand All @@ -10,15 +10,15 @@ services:
- ${PWD}:/home/jovyan/work

jupyter-isis:
image: gmap/jupyter-isis}
image: gmap/jupyter-isis:latest
ports:
- 8888:8888
volumes:
- ${PWD}:/home/jovyan/work
- ${ISIS_DATA}:/isis/data

jupyter-isis-asp:
image: gmap/jupyter-isis-asp}
image: gmap/jupyter-isis-asp:latest
ports:
- 8888:8888
volumes:
Expand Down

0 comments on commit f38e131

Please sign in to comment.