1
0
mirror of synced 2026-01-26 04:12:03 +00:00

Add Maiko Release to tags. Install Maiko from Release assets. (#567)

This commit is contained in:
Bill Stumbo
2021-11-20 23:27:28 -05:00
committed by GitHub
parent 7c65b47fba
commit 76a2235636
2 changed files with 32 additions and 20 deletions

View File

@@ -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