From 3779f392c6f467d81a3c3c4503bd99059a77590b Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Thu, 19 Mar 2026 22:38:29 -0700 Subject: [PATCH] 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 --- .github/workflows/buildDocker.yml | 32 ++++----- .github/workflows/buildLoadup.yml | 69 +++++++++++--------- .github/workflows/buildReleaseInclDocker.yml | 23 +++++-- .github/workflows/doHCFILES.yml | 10 +-- 4 files changed, 77 insertions(+), 57 deletions(-) diff --git a/.github/workflows/buildDocker.yml b/.github/workflows/buildDocker.yml index c752046c..a21d777c 100644 --- a/.github/workflows/buildDocker.yml +++ b/.github/workflows/buildDocker.yml @@ -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 }} diff --git a/.github/workflows/buildLoadup.yml b/.github/workflows/buildLoadup.yml index b57c399b..90af5525 100644 --- a/.github/workflows/buildLoadup.yml +++ b/.github/workflows/buildLoadup.yml @@ -24,7 +24,7 @@ on: description: "What maiko release to use" type: string default: 'Latest' - draft: + draft: description: "Mark this as a draft release" type: boolean default: false @@ -38,9 +38,9 @@ on: successful: description: "'True' if medley build completed successully" value: ${{ jobs.complete.outputs.build_successful }} - medley_release: - description: "Medley release tag for this run" - value: + github_release_tag: + description: "Github Release tag for release created in this run"" + value: ${{ jobs.loadup.outputs.github_release_tag }} inputs: maiko_release: description: "What maiko release to use" @@ -81,7 +81,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 }} @@ -108,6 +108,7 @@ jobs: outputs: combined_release_tag: ${{ steps.job_outputs.outputs.COMBINED_RELEASE_TAG }} + github_release_tag: ${{ steps.job_outputs.outputs.GITHUB_RELEASE_TAG }} medley_release_tag: ${{ steps.job_outputs.outputs.MEDLEY_RELEASE_TAG }} medley_short_release_tag: ${{ steps.job_outputs.outputs.MEDLEY_SHORT_RELEASE_TAG }} debs_filename_base: ${{ steps.debs.outputs.DEBS_FILENAME_BASE }} @@ -123,7 +124,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 }} @@ -131,7 +132,7 @@ jobs: # Checkout latest commit - name: Checkout Medley - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Setup release tag - name: Setup Release Tag @@ -148,7 +149,7 @@ jobs: then tag=$(gh release list --repo ${{ github.repository_owner }}/maiko | grep Latest | head -n 1 | awk '{ print $3 }') else - tag=$(echo "${{ inputs.maiko_release }}" | sed 's/[[:space:]]//g') + Merged into PR 544 (fgh_redo-linux-makefiles branch). Closing without merge to master. tag=$(echo "${{ inputs.maiko_release }}" | sed 's/[[:space:]]//g') set +e gh release view ${tag} --repo ${{ github.repository_owner }}/maiko if [ $? -ne 0 ]; then echo "!!!!!!! Error: Cannot find Maiko release ${tag}. Exiting."; exit 1; fi @@ -172,10 +173,12 @@ jobs: - name: Even More Environment Variables run: | echo "COMBINED_RELEASE_TAG=${MEDLEY_SHORT_RELEASE_TAG}_${MAIKO_SHORT_RELEASE_TAG}" >>${GITHUB_ENV} + echo "GITHUB_RELEASE_TAG=medley-${COMBINED_RELEASE_TAG}" >>${GITHUB_ENV} - name: Establish job outputs id: job_outputs run: | echo "COMBINED_RELEASE_TAG=${COMBINED_RELEASE_TAG}" >> ${GITHUB_OUTPUT} + echo "GITHUB_RELEASE_TAG=${GITHUB_RELEASE_TAG}" >> ${GITHUB_OUTPUT} echo "MEDLEY_RELEASE_TAG=${MEDLEY_RELEASE_TAG}" >> ${GITHUB_OUTPUT} echo "MEDLEY_SHORT_RELEASE_TAG=${MEDLEY_SHORT_RELEASE_TAG}" >> ${GITHUB_OUTPUT} echo "MAIKO_RELEASE_TAG=${MAIKO_RELEASE_TAG}" >> $GITHUB_OUTPUT; @@ -198,7 +201,7 @@ jobs: # Checkout Notecards and tar it in the tarballsdir - name: Checkout Notecards - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: ${{ github.repository_owner }}/notecards path: ./notecards @@ -228,19 +231,19 @@ jobs: - name: Delete existing release with same tag (if any) uses: cb80/delrel@latest with: - tag: ${{ env.MEDLEY_RELEASE_TAG }} + tag: ${{ env.GITHUB_RELEASE_TAG }} continue-on-error: true - name: Push the release id: push - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.21 with: allowUpdates: true artifacts: # ${{ env.TARBALL_DIR }}/notecards.tgz, ${{ env.TARBALL_DIR }}/${{ env.MEDLEY_RELEASE_TAG }}-loadups.tgz, ${{ env.TARBALL_DIR }}/${{ env.MEDLEY_RELEASE_TAG }}-runtime.tgz - tag: ${{ env.MEDLEY_RELEASE_TAG }} + tag: ${{ env.GITHUB_RELEASE_TAG }} draft: ${{ inputs.draft }} prerelease: false generateReleaseNotes: true @@ -248,7 +251,7 @@ jobs: # Save the tarball directory for subsequent jobs - name: Save tarballs - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: tarballs path: ${{ env.TARBALL_DIR }} @@ -273,7 +276,7 @@ jobs: # Checkout latest commit - name: Checkout Medley - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Environment variables - name: Environment variables @@ -290,7 +293,7 @@ jobs: # Get the tarballs - name: Get tarballs - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: tarballs path: ${{ env.TARBALL_DIR }} @@ -305,13 +308,13 @@ jobs: # Push the debs and tgz up to github releases - name: Push the release id: push_release - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.21 with: allowUpdates: true artifacts: ${{ env.DEBS_DIR }}/*.deb, ${{ env.TARS_DIR }}/*.tgz - tag: ${{ env.MEDLEY_RELEASE_TAG }} + tag: ${{ env.GITHUB_RELEASE_TAG }} token: ${{ secrets.GITHUB_TOKEN }} omitBodyDuringUpdate: true omitDraftDuringUpdate: true @@ -324,7 +327,7 @@ jobs: mv medley-full-linux-x86_64-*.tgz medley.tgz - name: Save medley tar for use in cygwin installers - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: medley-tar path: | @@ -354,7 +357,7 @@ jobs: # Checkout latest commit - name: Checkout Medley - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Environment variables - name: Environment variables @@ -371,7 +374,7 @@ jobs: # Get the tarballs - name: Get tarballs - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: tarballs path: ${{ env.TARBALL_DIR }} @@ -386,13 +389,13 @@ jobs: # Push the .dmg and .zip up to github releases - name: Push the release id: push_release - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.21 with: allowUpdates: true artifacts: # 2023-07-20 not yet building dmg -- ${{ env.ARTIFACTS_DIR }}/*.dmg, ${{ env.ARTIFACTS_DIR }}/*.zip - tag: ${{ env.MEDLEY_RELEASE_TAG }} + tag: ${{ env.GITHUB_RELEASE_TAG }} token: ${{ secrets.GITHUB_TOKEN }} omitBodyDuringUpdate: true omitDraftDuringUpdate: true @@ -423,7 +426,7 @@ jobs: # Checkout latest commit - name: Checkout Medley - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Store the values output from loadup job as environment variables - name: Environment Variables @@ -431,6 +434,8 @@ jobs: run: | $crt="${{ needs.loadup.outputs.combined_release_tag }}" echo "COMBINED_RELEASE_TAG=$crt" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append + $grt="${{ needs.loadup.outputs.github_release_tag }}" + echo "GITHUB_RELEASE_TAG=$grt" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append $mrt="${{ needs.loadup.outputs.medley_release_tag }}" echo "MEDLEY_RELEASE_TAG=$mrt" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append $msrt="${{ needs.loadup.outputs.medley_short_release_tag }}" @@ -442,7 +447,7 @@ jobs: # Retrieve medley tars from artifact store - name: Retrieve medley tar - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: medley-tar path: installers/cygwin/ @@ -492,11 +497,11 @@ jobs: # Upload windows installer to release - name: Upload windows installer to release id: push - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.21 with: allowUpdates: true artifacts: installers/cygwin/${{ env.CYGWIN_INSTALLER }} - tag: ${{ env.MEDLEY_RELEASE_TAG }} + tag: ${{ env.GITHUB_RELEASE_TAG }} token: ${{ secrets.GITHUB_TOKEN }} omitBodyDuringUpdate: true omitDraftDuringUpdate: true @@ -526,6 +531,8 @@ jobs: run: | crt="${{ needs.loadup.outputs.combined_release_tag }}" echo "COMBINED_RELEASE_TAG=${crt}" >>${GITHUB_ENV} + grt="${{ needs.loadup.outputs.github_release_tag }}" + echo "GITHUB_RELEASE_TAG=${crt}" >>${GITHUB_ENV} mrt="${{ needs.loadup.outputs.medley_release_tag }}" echo "MEDLEY_RELEASE_TAG=${mrt}" >>${GITHUB_ENV} msrt="${{ needs.loadup.outputs.medley_short_release_tag }}" @@ -535,7 +542,7 @@ jobs: # Checkout latest commit - name: Checkout Medley - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Upload a dummy file to release @@ -545,11 +552,11 @@ jobs: - run: echo "placeholder" >placeholder.txt - name: Upload windows placeholder.txt to release id: pushph - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.21 with: allowUpdates: true artifacts: placeholder.txt - tag: ${{ env.MEDLEY_RELEASE_TAG }} + tag: ${{ env.GITHUB_RELEASE_TAG }} token: ${{ secrets.GITHUB_TOKEN }} omitBodyDuringUpdate: true omitDraftDuringUpdate: true @@ -621,14 +628,14 @@ jobs: steps: # Delete the tarballs artifact - name: Delete tarballs artifact - uses: geekyeggo/delete-artifact@v5 + uses: geekyeggo/delete-artifact@v6 with: name: tarballs failOnError: false # 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 }} diff --git a/.github/workflows/buildReleaseInclDocker.yml b/.github/workflows/buildReleaseInclDocker.yml index 2b618386..940525f4 100644 --- a/.github/workflows/buildReleaseInclDocker.yml +++ b/.github/workflows/buildReleaseInclDocker.yml @@ -32,6 +32,10 @@ on: description: "Mark this as a draft release" type: boolean default: false + online: + description: "Deploy this release online" + type: boolean + default: true force: description: "Force build even if build already successfully completed for this commit" type: boolean @@ -53,6 +57,11 @@ on: required: false type: boolean default: false + online: + description: "Deploy this release online" + required: false + type: boolean + default: true force: description: "Force build even if build already successfully completed for this commit" required: false @@ -79,6 +88,8 @@ jobs: draft: ${{ inputs.draft }} force: ${{ inputs.force }} secrets: inherit + outputs: + github_release_tag: ${{ needs.do_release.outputs.github_release_tag }} ###################################################################################### @@ -88,6 +99,7 @@ jobs: needs: [do_release] uses: ./.github/workflows/buildDocker.yml with: + github_release_tag: ${{ needs.do_release.outputs.github_release_tag }} draft: ${{ inputs.draft }} force: ${{ inputs.force }} secrets: inherit @@ -106,14 +118,15 @@ jobs: # Kickoff workflow in online repo to build and deploy Medley docker image to oio do_oio: + if: ${{ inputs.online }} == true runs-on: ubuntu-24.04 - needs: [do_docker] + needs: [do_release, do_docker] steps: - name: trigger-oio-buildAndDeploy run: | - if [ ! "${{ inputs.draft }}" = true ] - then - gh workflow run buildAndDeployMedleyDocker.yml --repo Interlisp/online --ref main - fi + gh workflow run buildAndDeployMedleyDocker.yml \ + --repo Interlisp/online --ref main \ + -f github_release_tag=${{ needs.do_release.outputs.github_release_tag }} \ + -f draft=${{ inputs.draft }} env: GITHUB_TOKEN: ${{ secrets.ONLINE_TOKEN }} diff --git a/.github/workflows/doHCFILES.yml b/.github/workflows/doHCFILES.yml index 2d37f7c0..ff9774e6 100644 --- a/.github/workflows/doHCFILES.yml +++ b/.github/workflows/doHCFILES.yml @@ -50,28 +50,28 @@ jobs: steps: - name: Checkout Medley repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Checkout maiko - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: ${{ github.repository_owner }}/maiko path: ./maiko - name: Checkout notecards - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: ${{ github.repository_owner }}/notecards path: ./notecards - name: Checkout loops - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: ${{ github.repository_owner }}/loops path: ./loops - name: Checkout test - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: ${{ github.repository_owner }}/test path: ./test