Updated Docker build to use Medley Release Assets (#546)
This commit is contained in:
26
.github/workflows/buildDocker.yml
vendored
26
.github/workflows/buildDocker.yml
vendored
@@ -3,11 +3,13 @@
|
||||
# Interlisp workflow to build Docker Image that support multiple architectures
|
||||
name: Build Medley Docker image
|
||||
|
||||
# Run this workflow on push to master
|
||||
# Run this workflow on demand
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
# push:
|
||||
# branches:
|
||||
# - master
|
||||
|
||||
# Jobs that compose this workflow
|
||||
jobs:
|
||||
@@ -29,14 +31,14 @@ jobs:
|
||||
|
||||
# If this is git tag, use the tag name as a docker tag
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
fi
|
||||
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:${SHORTREF}"
|
||||
|
||||
# If the VERSION looks like a version number, assume that
|
||||
# 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 =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
if [[ $VERSION =~ ^medley-[0-9]{1,6}.$ ]]; then
|
||||
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
|
||||
fi
|
||||
|
||||
@@ -44,6 +46,16 @@ jobs:
|
||||
echo ::set-output name=tags::${TAGS}
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
echo ::set-output name=build_time::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||
echo ::set-output name=version::${VERSION}
|
||||
|
||||
# Download Medley Release Assets
|
||||
- name: Download Release Assets
|
||||
uses: robinraju/release-downloader@v1.2
|
||||
with:
|
||||
repository: Interlisp/medley
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
latest: true
|
||||
fileName: "*"
|
||||
|
||||
# Setup Docker Machine Emulation environment
|
||||
- name: Set up QEMU
|
||||
|
||||
Reference in New Issue
Block a user