From bc091d1486c203a7be3729f029d743ecf09e57a9 Mon Sep 17 00:00:00 2001 From: Bill Stumbo Date: Thu, 11 Nov 2021 18:42:50 -0500 Subject: [PATCH] Add Maiko Release to tags. Install Maiko from Release assets. --- .github/workflows/buildDocker.yml | 50 +++++++++++++++++++------------ Dockerfile | 2 +- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.github/workflows/buildDocker.yml b/.github/workflows/buildDocker.yml index f5b8c3d25..58c4d3e07 100644 --- a/.github/workflows/buildDocker.yml +++ b/.github/workflows/buildDocker.yml @@ -7,10 +7,6 @@ name: Build Medley Docker image on: workflow_dispatch: -# push: -# branches: -# - master - # Jobs that compose this workflow jobs: # Job to build the docker image @@ -21,27 +17,34 @@ jobs: - name: Checkout uses: actions/checkout@v2 + # Get the Medley Release Information + - name: Get Medley Release Information + id: medley_version + uses: abatilo/release-info-action@v1.3.0 + with: + owner: Interlisp + repo: medley + + # Get the Maiko Release Information + - name: Get Maiko Release Information + id: maiko_version + uses: abatilo/release-info-action@v1.3.0 + with: + owner: Interlisp + repo: maiko + # Setup needed environment variables - name: Prepare id: prep run: | - DOCKER_IMAGE=interlisp/${GITHUB_REPOSITORY#*/} + DOCKERHUB_ACCOUNT=interlisp + DOCKER_IMAGE=${DOCKERHUB_ACCOUNT}/${GITHUB_REPOSITORY#*/} VERSION=latest - SHORTREF=${GITHUB_SHA::8} - - # If this is git tag, use the tag name as a docker tag - if [[ $GITHUB_REF == refs/tags/* ]]; then - VERSION=${GITHUB_REF#refs/tags/} - fi - TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}" - - # If the VERSION looks like medley followed by a date, assume that - # this is the most recent version of the image and also - # tag it 'latest'. - if [[ $VERSION =~ ^medley-[0-9]{1,6}.$ ]]; then - TAGS="$TAGS,${DOCKER_IMAGE}:latest" - fi + MAIKO_RELEASE=${{ steps.maiko_version.outputs.latest_tag }} + MEDLEY_RELEASE=${{ steps.medley_version.outputs.latest_tag }} + TAGS="${DOCKER_IMAGE}:${MEDLEY_RELEASE},${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${MAIKO_RELEASE}" + # Set output parameters. echo ::set-output name=tags::${TAGS} echo ::set-output name=docker_image::${DOCKER_IMAGE} @@ -57,6 +60,15 @@ jobs: latest: true fileName: "*" + # Download Maiko Release Assets + - name: Download Release Assets + uses: robinraju/release-downloader@v1.2 + with: + repository: Interlisp/maiko + token: ${{ secrets.GITHUB_TOKEN }} + latest: true + fileName: "*" + # Setup Docker Machine Emulation environment - name: Set up QEMU uses: docker/setup-qemu-action@master diff --git a/Dockerfile b/Dockerfile index fd304039b..979ce1610 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM interlisp/maiko:latest +FROM ubuntu:focal ARG BUILD_DATE LABEL name="Medley" # LABEL tags=${tags}