1
0
mirror of synced 2026-04-18 09:26:18 +00:00

Add inputs to all workflow that allow to use a specific maiko release. Add input to workflows that allow to use a specific medley release - e.g., for building a Medley docker image

This commit is contained in:
Frank Halasz
2026-03-19 22:38:29 -07:00
parent fd5b5ef8f0
commit 3779f392c6
4 changed files with 77 additions and 57 deletions

View File

@@ -21,8 +21,8 @@ name: 'Build/Push Docker Image'
on:
workflow_dispatch:
inputs:
medley_release:
description: "Tag for Medley release to use"
github_release_tag:
description: "Tag for the Github Release to use for building this Medley Docker image"
type: string
default: "Latest"
draft:
@@ -40,8 +40,8 @@ on:
description: "'True' if medley docker build completed successully"
value: ${{ jobs.complete.outputs.build_successful }}
inputs:
medley_release:
description: "Tag for Medley release to use"
github_release_tag:
description: "Tag for the Github Release to use for building this Medley Docker image"
required: false
type: string
default: "Latest"
@@ -82,7 +82,7 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}
@@ -114,21 +114,21 @@ jobs:
steps:
# Checkout latest commit
- name: Checkout Medley
uses: actions/checkout@v4
uses: actions/checkout@v6
# Find named or latest release
# and download its assets
- name: Download linux debs from named or latest release
run: |
tag=""
if [ "${{ inputs.medley_release }}" = "Latest" ];
if [ "${{ inputs.github_release_tag }}" = "Latest" ];
then
tag=$(gh release list | grep Latest | head -n 1 | awk '{ print $3 }')
else
tag=$(echo "${{ inputs.medley_release }}" | sed 's/[[:space:]]//g')
tag=$(echo "${{ inputs.github_release_tag }}" | sed 's/[[:space:]]//g')
set +e
gh release view ${tag} --repo ${{ github.repository_owner }}/medley
if [ $? -ne 0 ]; then echo "!!!!!!! Error: Cannot find Medley release ${tag}. Exiting."; exit 1; fi
if [ $? -ne 0 ]; then echo "!!!!!!! Error: Cannot find Medley release ${tag} on github Medley repo. Exiting."; exit 1; fi
set -e
fi
mkdir -p release_debs
@@ -137,7 +137,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Get Maiko and Medley release information from name of deb files
# just downloaded from the Medley latest release
# just downloaded from the Medley github release
- name: Get info about Miako and Medley releases
id: release_info
run: |
@@ -164,7 +164,7 @@ jobs:
platforms="linux/amd64"
#,linux/arm64
else
docker_tags="${docker_image}:draft"
docker_tags="${docker_image}:draft,${docker_image}:${MEDLEY_RELEASE#*-}_${MAIKO_RELEASE#*-}""
platforms="linux/amd64"
fi
echo "REPO_NAME=${repo_name}" >> ${GITHUB_ENV}
@@ -177,7 +177,7 @@ jobs:
# Setup the Docker Machine Emulation environment.
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: linux/amd64
# ,linux/arm64,linux/arm/v7
@@ -185,11 +185,11 @@ jobs:
# Setup the Docker Buildx funtion
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
# Login into DockerHub - required to store the created image
- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
@@ -198,7 +198,7 @@ jobs:
# checked out and the release tars just downloaded.
# Push the result to Docker Hub
- name: Build Docker Image for Push to Docker Hub
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
builder: ${{ steps.buildx.outputs.name }}
build-args: |
@@ -230,7 +230,7 @@ jobs:
steps:
# Checkout the actions for this repo owner
- name: Checkout Actions
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ github.repository_owner }}/.github
path: ./Actions_${{ github.sha }}