From 64e0ad087501efae1ffb5706b2efa3d77869ea89 Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 5 Jun 2024 21:52:43 -0700 Subject: [PATCH 1/7] Debugging caaling of buildand deploy workflow --- .github/workflows/buildMedleyDocker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildMedleyDocker.yml b/.github/workflows/buildMedleyDocker.yml index ad431e1..69e5409 100644 --- a/.github/workflows/buildMedleyDocker.yml +++ b/.github/workflows/buildMedleyDocker.yml @@ -49,9 +49,9 @@ jobs: steps: - id: platform run: > - if [ '${{ toJSON(inputs) }}' = 'null' ]; - then echo "platform=${{ github.event.inputs.platform }}" >> ${GITHUB_OUTPUT}; - else echo "platform=${{ inputs.platform }}" >> ${GITHUB_OUTPUT}; + if [ '${{ toJSON(inputs) }}' = '{}' ]; + then echo "platform=${{ inputs.platform }}" >> ${GITHUB_OUTPUT}; + else echo "platform=linux/amd64" >> ${GITHUB_OUTPUT}; fi From 46609364fb6fdc6290181544d77c24f435313213 Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 5 Jun 2024 22:13:28 -0700 Subject: [PATCH 2/7] In buildMedleyDocker, get rid of input job since its not really necessary --- .github/workflows/buildMedleyDocker.yml | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/.github/workflows/buildMedleyDocker.yml b/.github/workflows/buildMedleyDocker.yml index 69e5409..4318d6f 100644 --- a/.github/workflows/buildMedleyDocker.yml +++ b/.github/workflows/buildMedleyDocker.yml @@ -39,22 +39,6 @@ on: jobs: - # Regularize the inputs so they can be referenced the same way whether they are - # the result of a workflow_dispatch or a workflow_call - - inputs: - runs-on: ubuntu-latest - outputs: - platform: ${{ steps.platform.outputs.platform }} - steps: - - id: platform - run: > - if [ '${{ toJSON(inputs) }}' = '{}' ]; - then echo "platform=${{ inputs.platform }}" >> ${GITHUB_OUTPUT}; - else echo "platform=linux/amd64" >> ${GITHUB_OUTPUT}; - fi - - # Build and push the docker image build_and-push: @@ -164,7 +148,7 @@ jobs: # Setup the Docker Machine Emulation environment. - name: Set up QEMU - if: ${{ needs.inputs.outputs.platform == 'linux/arm64' }} + if: ${{ inputs.platform == 'linux/arm64' }} uses: docker/setup-qemu-action@master with: platforms: linux/arm64 @@ -186,7 +170,7 @@ jobs: - name: Strip the linux/ from the platform input id: platform_var run: | - echo "platform=$(echo "${{ needs.inputs.outputs.platform }}" | sed s-linux/--)" >> ${GITHUB_OUTPUT} + echo "platform=$(echo "${{ inputs.platform }}" | sed s-linux/--)" >> ${GITHUB_OUTPUT} # Do the Docker Build using the Dockerfile in the repository # checked out and the release tars just downloaded. @@ -206,6 +190,6 @@ jobs: PLATFORM=${{ steps.platform_var.outputs.platform }} context: ./docker_medley file: ./docker_medley/Dockerfile_medley - platforms: ${{ needs.inputs.outputs.platform }} + platforms: ${{ inputs.platform }} push: true tags: ${{ steps.docker_env.outputs.docker_tags }} From 77171776d275b622294098d08815824d480dfbcd Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 5 Jun 2024 22:20:52 -0700 Subject: [PATCH 3/7] In buildMedleyDocker, fix typo --- .github/workflows/buildMedleyDocker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildMedleyDocker.yml b/.github/workflows/buildMedleyDocker.yml index 4318d6f..d2dccaf 100644 --- a/.github/workflows/buildMedleyDocker.yml +++ b/.github/workflows/buildMedleyDocker.yml @@ -42,7 +42,7 @@ jobs: # Build and push the docker image build_and-push: - needs: inputs + runs-on: ubuntu-latest steps: From 0ed8951c10e7626dd252c83ccfd045b73b0570f2 Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 5 Jun 2024 22:34:27 -0700 Subject: [PATCH 4/7] In buildMedleyDocker, try using explicit secrets --- .github/workflows/buildAndDeployMedleyDocker.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildAndDeployMedleyDocker.yml b/.github/workflows/buildAndDeployMedleyDocker.yml index ef83394..9a46589 100644 --- a/.github/workflows/buildAndDeployMedleyDocker.yml +++ b/.github/workflows/buildAndDeployMedleyDocker.yml @@ -42,9 +42,13 @@ jobs: uses: ./.github/workflows/buildMedleyDocker.yml with: platform: ${{ inputs.platform }} - secrets: inherit + secrets: + CCRYPT_KEY: ${{ secrets.CCRYPT_KEY }} + OIO_SSH_KEY: ${{ secrets.OIO_SSH_KEY }} deploy: needs: build uses: ./.github/workflows/deployMedleyDocker.yml - secrets: inherit + secrets: + CCRYPT_KEY: ${{ secrets.CCRYPT_KEY }} + OIO_SSH_KEY: ${{ secrets.OIO_SSH_KEY }} From acb0c6a79a4514e80d2b377a8efd2e30ec10112a Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 5 Jun 2024 22:41:29 -0700 Subject: [PATCH 5/7] Fiddle with secrets in workflow call --- .github/workflows/buildAndDeployMedleyDocker.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/buildAndDeployMedleyDocker.yml b/.github/workflows/buildAndDeployMedleyDocker.yml index 9a46589..a810dac 100644 --- a/.github/workflows/buildAndDeployMedleyDocker.yml +++ b/.github/workflows/buildAndDeployMedleyDocker.yml @@ -44,11 +44,9 @@ jobs: platform: ${{ inputs.platform }} secrets: CCRYPT_KEY: ${{ secrets.CCRYPT_KEY }} - OIO_SSH_KEY: ${{ secrets.OIO_SSH_KEY }} deploy: needs: build uses: ./.github/workflows/deployMedleyDocker.yml secrets: - CCRYPT_KEY: ${{ secrets.CCRYPT_KEY }} OIO_SSH_KEY: ${{ secrets.OIO_SSH_KEY }} From abb300d712e0c2e894a835017d7a7744c9d7803e Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 5 Jun 2024 22:53:44 -0700 Subject: [PATCH 6/7] In buildDockerMedley, explicitly state need to checkpout from online repo so we can call from workflow in medley repo --- .github/workflows/buildMedleyDocker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildMedleyDocker.yml b/.github/workflows/buildMedleyDocker.yml index d2dccaf..a5e62f6 100644 --- a/.github/workflows/buildMedleyDocker.yml +++ b/.github/workflows/buildMedleyDocker.yml @@ -70,10 +70,11 @@ jobs: if: steps.cache-lfs.outputs.cache-hit == 'true' run: mv docker_medley ../save_docker_medley - # Checkout latest commit + # Checkout latest (online) commit - name: Checkout Online code uses: actions/checkout@v4 with: + repository: ${{ github.repository_owner }}/online lfs: ${{ steps.cache-lfs.outputs.cache-hit != 'true' }} - name: Checkout lfs files From c6911aaff1c0b095b9f60fd35ecd7a5792963c14 Mon Sep 17 00:00:00 2001 From: Frank Halasz Date: Wed, 5 Jun 2024 23:17:12 -0700 Subject: [PATCH 7/7] Undo last commit - checkout action no longer specifies which repo --- .github/workflows/buildMedleyDocker.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/buildMedleyDocker.yml b/.github/workflows/buildMedleyDocker.yml index a5e62f6..0a4ca6c 100644 --- a/.github/workflows/buildMedleyDocker.yml +++ b/.github/workflows/buildMedleyDocker.yml @@ -1,17 +1,16 @@ -# buildDocker.yml +# buildDocker.yml # -# Workflow to build and push a multiplatform Docker image for the Medley that runs -# on online.interlisp.org. +# Workflow to build and push a multiplatform Docker image for the Medley that runs +# on online.interlisp.org. # -# This workflow uses the latest Medley docker image and the latest Interlisp/online -# release on github. +# This workflow uses the latest Medley docker image and the latest Interlisp/online +# release on github. # # 2022-01-19 by Frank Halasz based on Medley buildDocker.yml # # # Copyright: 2022 by Interlisp.org # -#set -x # name: 'Build/Push Online-Medley Docker Image' @@ -70,11 +69,10 @@ jobs: if: steps.cache-lfs.outputs.cache-hit == 'true' run: mv docker_medley ../save_docker_medley - # Checkout latest (online) commit + # Checkout latest commit - name: Checkout Online code uses: actions/checkout@v4 with: - repository: ${{ github.repository_owner }}/online lfs: ${{ steps.cache-lfs.outputs.cache-hit != 'true' }} - name: Checkout lfs files