From 9793e48c4ef3eef4367cb5d4e6425eee47a254da Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Mon, 10 Jun 2024 14:52:39 -0700 Subject: [PATCH] Update buildReleaseIncDocker workflow to automatically kick off a buildAndDeployMedleyDocker workflow in the online repo (#1752) * to buildReleaseInclDocker workflow, add call to build and deploy the Online-Medley Docker image to oio * add version tag to call to buildAndDeploy... workflow in online * Oh boy, get the name of the build and deploy workflow in online right this time! * Added explicit secrets to call to medley online build deploy workflow * fix test code in buildReleaseInclDocker * debuggin gbuildReleaseInclDocker * Debugging adding of online deploy to buildReleaseInclDocker * Change approach to running buildDeployMedleyDocker online workflow to use gh workflow run rather than use a cross-repo workflow call * GH_TOKEN or GITHUB_TOKEN? * Create ONLINE_TOKEN to access online repo from medley repo workflows via gh * From buildReleaseInclDocker workflow, remove debugging stuff; change kickoff of oio build and deploy so that it will not kickoff workflow if draft is true --- .github/workflows/buildReleaseInclDocker.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildReleaseInclDocker.yml b/.github/workflows/buildReleaseInclDocker.yml index f0f6192e..652103ec 100644 --- a/.github/workflows/buildReleaseInclDocker.yml +++ b/.github/workflows/buildReleaseInclDocker.yml @@ -3,6 +3,7 @@ # # Interlisp webflow to build a Medley release and push it to github. # And to build a multiplatform Docker image for the release and push it to Docker Hub. +# And to kickoff a build and deploy workflow for Medley-online within the online repo. # # This workflow just calls two reuseable workflows to the two task: # buildLoadup.yml and buildDocker.yml @@ -14,12 +15,12 @@ # ****************************************************************************** -name: "Build/Push Release & Docker" +name: "Build/Push Release, Docker, OIO" # Run this workflow on ... on: schedule: - - cron: '0 9 * * 3' + - cron: '17 9 * * 3' workflow_dispatch: inputs: @@ -111,3 +112,16 @@ jobs: ###################################################################################### + # Kickoff workflow in online repo to build and deploy Medley docker image to oio + do_oio: + runs-on: ubuntu-latest + needs: [inputs, do_docker] + steps: + - name: trigger-oio-buildAndDeploy + run: | + if [ ! "${{ needs.inputs.outputs.draft }}" = "true" ] + then + gh workflow run buildAndDeployMedleyDocker.yml --repo Interlisp/online --ref master + fi + env: + GITHUB_TOKEN: ${{ secrets.ONLINE_TOKEN }}