Skip to content

Commit

Permalink
include isis-asp
Browse files Browse the repository at this point in the history
  • Loading branch information
chbrandt committed Oct 31, 2023
1 parent 39b0438 commit c702205
Showing 1 changed file with 78 additions and 1 deletion.
79 changes: 78 additions & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
env:
USER_ORG: ${{ vars.DOCKERHUB_USERNAME }}
SERVICE: jupyter-isis
SERVICE: jupyter-gispy
REPO: ${USER_ORG}/${SERVICE}

steps:
Expand Down Expand Up @@ -106,3 +106,80 @@ jobs:
| tail -n+2 | awk '{print $1":"$2}'
| grep "${REPO}"
| xargs -I'{}' docker push {}
isis-asp:
runs-on: ubuntu-latest
env:
USER_ORG: ${{ vars.DOCKERHUB_USERNAME }}
SERVICE1: jupyter-isis
SERVICE2: jupyter-isis-asp

steps:
- # https://github.com/marketplace/actions/checkout
name: Checkout
uses: actions/checkout@v4

- name: Build image
run: |
docker compose -f compose.build.yml build $SERVICE1
docker compose -f compose.build.yml build $SERVICE2
- name: Tag image
if: ${{ github.event_name == 'push' }}
env:
REPO1: ${USER_ORG}/$SERVICE1
REPO2: ${USER_ORG}/$SERVICE2
run: |
NEW_IMAGE1=`docker compose -f compose.build.yml config --images $SERVICE1`
NEW_IMAGE2=`docker compose -f compose.build.yml config --images $SERVICE2`
docker tag $NEW_IMAGE1 ${REPO1}:$GITHUB_REF_NAME
docker tag $NEW_IMAGE2 ${REPO2}:$GITHUB_REF_NAME
- name: Tag 'latest' image
if: ${{ github.ref_type == 'tag' }}
env:
REPO1: ${USER_ORG}/$SERVICE1
REPO2: ${USER_ORG}/$SERVICE2
run: |
NEW_IMAGE1=`docker compose -f compose.build.yml config --images $SERVICE1`
NEW_IMAGE2=`docker compose -f compose.build.yml config --images $SERVICE2`
DATE=`date +%Y%m%d`
docker tag $NEW_IMAGE1 ${REPO1}:latest
docker tag $NEW_IMAGE1 ${REPO1}:$DATE
docker tag $NEW_IMAGE2 ${REPO2}:latest
docker tag $NEW_IMAGE2 ${REPO2}:$DATE
# - name: Tag image with SHA hash
# if: ${{ github.event_name == 'push' }}
# run: |
# IMAGE_SHA=`docker images -q $NEW_IMAGE`
# docker tag $NEW_IMAGE ${USERNAME}/jupyter-gispy:$IMAGE_SHA

- name: List images
run: docker image ls -a

- # https://github.com/marketplace/actions/docker-login
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push image ISIS
env:
REPO: ${USER_ORG}/$SERVICE1
run: >
docker image ls
| tail -n+2 | awk '{print $1":"$2}'
| grep "${REPO}"
| xargs -I'{}' docker push {}
- name: Push image ISIS-ASP
env:
REPO: ${USER_ORG}/$SERVICE2
run: >
docker image ls
| tail -n+2 | awk '{print $1":"$2}'
| grep "${REPO}"
| xargs -I'{}' docker push {}

0 comments on commit c702205

Please sign in to comment.