Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 31 additions & 19 deletions .github/workflows/buildDocker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM interlisp/maiko:latest
FROM ubuntu:focal
ARG BUILD_DATE
LABEL name="Medley"
# LABEL tags=${tags}
Expand Down