* First pass at workflow for doing HCFILES on each release * Finish doHCFILES workflow * Fix delete of gh-page branch in DoHCFILES workflow * Redo doHCFILES workflow for files.interlisp.org; add indexing to do_hcfiles script * Fiddling with workflow names so that I can test doHCFILES.yml on a branch * in doHCFILES workflow fix use of GH_TOKEN * Fix typo in doHCFILES workflow * Debugging doHCFILES workflow * Fix multiple bugs in do_hcfiles script; fixed multiple bugs in doHCFILES workflow * Debugging move * in do_hcfiles.sh add back in Tedit file stoHCFILES run * Clean up do_hcfiles.sh a bit * Add debugging code to doHCFILES workflow * In MAKE-INDEX-HTMLS, add code to ensure that the original case of the files/directory names are preserved since (DIRECTORY) seems to return names ia all-caps, always * Debugging doHCFILES * Fiddling with debugging code in doHCFILES workflow * Add MEDLEY-INIT-VARS to cm file in do_hcfiles.sh * Undo effect of merging fgh_hcfiles-updates into fgh_hcfiles-workflow. fgh_hcfiles-update will be abadoned * Add up button to index.html files in MAKE-INDEX-HTMLS * Update MAKE-INDEX-HTMLS to include an up-on-level button in index.html files. Move fio files to medley instead of source. Streamline doHCFILES workflow * Debugging * In MAKE-INDEX-HTMLS, make sure that the up-one button does not appear in the top-level index.html * In doHCFILES workflow, add difference between development(draft) and production; add doHCFILES workflow into buildReleraseInclDocker workflow * Update MAKE-INDEX-HTMLS with new onclick script to handle directories properly * Fix typo in buildRelease workflow * Polishing up do_hcfiles.sh * Return buildDocker.yml to original state after using it to test doHCFILES.yml
138 lines
3.8 KiB
YAML
138 lines
3.8 KiB
YAML
#*******************************************************************************
|
|
# buidReleaseInclDocker.yml
|
|
#
|
|
# 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
|
|
#
|
|
# 2022-01-18 Frank Halasz
|
|
#
|
|
# Copyright 2022 by Interlisp.org
|
|
#
|
|
# ******************************************************************************
|
|
|
|
|
|
name: "Build/Push Release, Docker, OIO"
|
|
|
|
# Run this workflow on ...
|
|
on:
|
|
schedule:
|
|
- cron: '17 9 * * 3'
|
|
|
|
workflow_dispatch:
|
|
inputs:
|
|
draft:
|
|
description: "Mark this as a draft release"
|
|
type: choice
|
|
options:
|
|
- 'false'
|
|
- 'true'
|
|
force:
|
|
description: "Force build even if build already successfully completed for this commit"
|
|
type: choice
|
|
options:
|
|
- 'false'
|
|
- 'true'
|
|
|
|
workflow_call:
|
|
outputs:
|
|
successful:
|
|
description: "'True' if medley build completed successully"
|
|
value: ${{ jobs.complete.outputs.build_successful }}
|
|
inputs:
|
|
draft:
|
|
description: "Mark this as a draft release"
|
|
required: false
|
|
type: string
|
|
default: 'false'
|
|
force:
|
|
description: "Force build even if build already successfully completed for this commit"
|
|
required: false
|
|
type: string
|
|
default: 'false'
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
|
|
# Jobs that compose this workflow
|
|
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:
|
|
draft: ${{ steps.one.outputs.draft }}
|
|
force: ${{ steps.one.outputs.force }}
|
|
steps:
|
|
- id: one
|
|
run: >
|
|
if [ '${{ toJSON(inputs) }}' != '{}' ];
|
|
then
|
|
echo "draft=${{ inputs.draft }}" >> $GITHUB_OUTPUT;
|
|
echo "force=${{ inputs.force }}" >> $GITHUB_OUTPUT;
|
|
else
|
|
echo "draft=false" >> $GITHUB_OUTPUT;
|
|
echo "force=false" >> $GITHUB_OUTPUT;
|
|
fi
|
|
|
|
|
|
######################################################################################
|
|
|
|
|
|
# Build Loadup
|
|
do_release:
|
|
needs: inputs
|
|
uses: ./.github/workflows/buildLoadup.yml
|
|
with:
|
|
draft: ${{ needs.inputs.outputs.draft }}
|
|
force: ${{ needs.inputs.outputs.force }}
|
|
secrets: inherit
|
|
|
|
|
|
######################################################################################
|
|
|
|
# Build Docker Image
|
|
do_docker:
|
|
needs: [inputs, do_release]
|
|
uses: ./.github/workflows/buildDocker.yml
|
|
with:
|
|
draft: ${{ needs.inputs.outputs.draft }}
|
|
force: ${{ needs.inputs.outputs.force }}
|
|
secrets: inherit
|
|
|
|
######################################################################################
|
|
|
|
# Run HCFILES and push to files.interlisp.org
|
|
do_HCFILES:
|
|
needs: [inputs, do_release]
|
|
uses: ./.github/workflows/doHCFILES.yml
|
|
with:
|
|
draft: ${{ needs.inputs.outputs.draft }}
|
|
secrets: inherit
|
|
|
|
######################################################################################
|
|
|
|
# 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 }}
|