Windows installer and medley script for running Medley in Docker on Windows (#1077)
* Update docker file build to use new deb linux installers; move Dockefile to .github/workflows since its really only useable from the buildDocker.yml workflow * Fix typo in dockerfile location * remove extraneous " in >>GITHUB_ENV statements * Fix handling of TARGETPLATFORM in Dockerfile * Trying with just one platform * Fix issues with missing man-db in docker build workflow; added man-db to depends in deb builds for linux * Sicthed docker from tightvnc to tigervnc to match oio. This getting the apt package name right. * Going back to single platform to debug this thing * Trying with just arm64 * Removing arm/v7 from docker images. Takes too long to build and just wastes our github actions minutes. This is assuming its a never used feature since docker is not big on raspberry pis and their ilk. * Fix typo in control-linux; update build_deb so that files in /usr/local installed by deb are owned by root; add ubuntu user and nano in docker file for dbebugging; when in draft only create for x86_64 platform * Fix typo in buildDocker.yml * Add sudo to docker image; in docker image ensure that all /usr/local/interlisp files are owned by root * Add securityTypes none to docker entrypoint * Updated docker base to Ubuntu 22.10 to get fixed xrdp; add xrdp to the docker image; updated user permission in docker image; * In Dockerfile make xrdp install noninteractive * Update medley.sh scripts to handle docker case * Fix a couple of typos * BuildDcoker: added pulling latest draft release (if any) when this is a draft docker build; removed checkout of medley code cause its not used * BuildDocker: added medley checkout backin - turns pout its needed by a bunch of actions even though I dont really think they use it * BuildDocker: moved download assets to use gh instaed of a marketplace action becauase that action could not handle draft releases. * Tweaking medley.sh and associated tweaks to work Windows via wsl medley and docker * adding first pass at powershell script for windows docker and wsl * Tuning how Xvnc, medley, and vncviewer handle the various ways of exiting - eg logout vs closing viewer window. * Tuning vncviewer launch to make sure that tty works as expected when medley.sh runs in background * Minor typo fixes and added extra check to use of /run/shm in medley_vnc.sh * Added SSH_KEY secret to buildReleaseIncDocker workflow * Gertting the add SSH_KEY secret into orkflows right this time, hopefully * Adding TERM env variable and setting USER to medley in docker image * Debugging medley.ps1 and adding a couple of arguments * Typo in Dockerfile medley * Synchronizing flag processing and usage for medley.ps1 and medley.sh; refactored medley_args.sh and medley_usage.sh code. * Adding first pass at windows installer * Adding first pass an inno setup script for Windows installation * Update buildLoadup workflow and downloads page for windows installer * Fix typo in buildLoadup * BuildLoadup make sure windows runner uses powershell * Another typo in buildLoadup * Another typo in buildLoadup; damn those double quotes * Updating handling of windows installer in buildLoadup, added vncviewer to medley.iss install * Unknown syntax error in buildLoadup * Another damn typo from double quotes * buildLoadup: fixed loadup job outputs * buidLoadup: fixed bug with COMBINED_RELEASE_TAG; fixed Upload script in windows job to be compatible with actions.script v6. * buidLoadup: upload win installer adapted to find draft releases as well as full releases * BuildLoadup: fixing up javascript in actions in windows job to use / instead of \ in pathname * BuildLoadup: changing win installer update to same action used for other release assets * Fix windows installer file name; in BuildLoadup move update downl;oad page to the Windows runner because uploading the window-installer changes the release download url, so updating the downloads page must be done after the windows installer upload.; General buildLoadup cleanup * Run md2html to update downloads page * Fix typo in build_deb.sh * Removing some leftover crud in medley_usage.sh * Fixing up windows installer a bit, mostly cosmetic * Adding support for WSL1; mostly forcing --vnc and changing how to find open ports and displays since WSL1 networking is different tha WSL2 * Update manual page for new Windows Medley script * First pass done for man page that incorporates new Windows medley script. Add Xvnc wait before calling run-medley in case of docker to prevent occasonal missing X windows server error. * Change buildLoadup to update man page to a draft if this is a draft run.
This commit is contained in:
78
.github/workflows/Dockerfile_medley
vendored
Normal file
78
.github/workflows/Dockerfile_medley
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
#*******************************************************************************
|
||||
#
|
||||
# Dockerfile to build Medley image from latest Maiko image
|
||||
# plus latest release tars from github
|
||||
#
|
||||
# Copyright 2022-2023 by Interlisp.org
|
||||
#
|
||||
# ******************************************************************************
|
||||
|
||||
FROM ubuntu:22.10
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
# Handle ARGs, ENV variables, and LABELs
|
||||
ARG BUILD_DATE=unknown
|
||||
ARG MEDLEY_RELEASE=unknown
|
||||
ARG MAIKO_RELEASE=unknown
|
||||
ARG REPO_OWNER=Interlisp
|
||||
LABEL name="Medley"
|
||||
LABEL description="The Medley Interlisp environment"
|
||||
LABEL url="https://github.com/${REPO_OWNER}/medley"
|
||||
LABEL build-date=$BUILD_DATE
|
||||
LABEL medley_release=$MEDLEY_RELEASE
|
||||
LABEL maiko_release=$MAIKO_RELEASE
|
||||
|
||||
ENV MEDLEY_DOCKER_BUILD_DATE=$BUILD_DATE
|
||||
ENV MEDLEY_RELEASE=$MEDLEY_RELEASE
|
||||
ENV MAIKO_RELEASE=$MAIKO_RELEASE
|
||||
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
# Copy over the release deb files
|
||||
ADD ./*.deb /tmp
|
||||
|
||||
# Install Medley/Maiko and add tightvnc server and xclip to the image
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y apt-utils \
|
||||
&& apt-get install -y tigervnc-standalone-server \
|
||||
&& apt-get install -y xclip \
|
||||
&& apt-get install -y man-db \
|
||||
&& apt-get install -y nano \
|
||||
&& apt-get install -y sudo \
|
||||
&& p=$(echo "${TARGETPLATFORM}" | sed -e "s#linux/##") \
|
||||
&& p=$( \
|
||||
if [ "$p" = "amd64" ]; \
|
||||
then echo "x86_64"; \
|
||||
elif [ "$p" = "arm64" ]; \
|
||||
then echo "aarch64"; \
|
||||
elif [ "$p" = "arm/v7" ]; \
|
||||
then echo "armv7l"; \
|
||||
else \
|
||||
echo "x86_64"; \
|
||||
fi \
|
||||
) \
|
||||
&& deb="medley-full-${MEDLEY_RELEASE#medley-}" \
|
||||
&& deb=${deb}_${MAIKO_RELEASE#maiko-}-linux-${p}.deb \
|
||||
&& apt-get install -y /tmp/${deb} \
|
||||
&& chown --recursive root:root /usr/local/interlisp \
|
||||
&& (if [ -n "$(which unminimize)" ]; then (yes | unminimize); fi)
|
||||
|
||||
# "Finalize" image
|
||||
EXPOSE 5900
|
||||
RUN adduser --gecos "" medley \
|
||||
&& adduser --gecos "" ubuntu \
|
||||
&& adduser medley sudo \
|
||||
&& adduser ubuntu sudo \
|
||||
&& (echo 'medley:yeldem' | chpasswd ) \
|
||||
&& (echo 'ubuntu:utnubu' | chpasswd ) \
|
||||
&& echo "medley ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers \
|
||||
&& echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers \
|
||||
&& mkdir -p /home/medley/il \
|
||||
&& chown medley:medley /home/medley/il
|
||||
|
||||
ENV TERM=xterm
|
||||
USER medley
|
||||
WORKDIR /home/medley
|
||||
#ENTRYPOINT USER=medley Xvnc -SecurityTypes none -geometry 1280x720 :0 & DISPLAY=:0 medley --full -g 1280x720
|
||||
ENTRYPOINT /bin/bash
|
||||
|
||||
109
.github/workflows/buildDocker.yml
vendored
109
.github/workflows/buildDocker.yml
vendored
@@ -136,60 +136,60 @@ jobs:
|
||||
# Checkout latest commit
|
||||
- name: Checkout Medley
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Find latest release (draft or normal)
|
||||
# and download its assets
|
||||
- name: Download linux debs from latest (draft) release
|
||||
run: |
|
||||
tag=""
|
||||
if [ "${{ needs.inputs.outputs.draft }}" = "true" ];
|
||||
then
|
||||
tag=$(gh release list | grep Draft | head -n 1 | awk '{ print $3 }')
|
||||
fi
|
||||
if [ -z "${tag}" ];
|
||||
then
|
||||
tag=$(gh release list | grep Latest | head -n 1 | awk '{ print $3 }')
|
||||
fi
|
||||
mkdir -p release_debs
|
||||
gh release download ${tag} -D release_debs -p '*-linux-*.deb'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Get Maiko and Medley release information from name of deb files
|
||||
# just downloaded from the Medley latest release
|
||||
- name: Get info about Miako and Medley releases
|
||||
id: release_info
|
||||
run: |
|
||||
regex="^[^0-9]*\([^_]*\)_\([^-]*-[^-]*\)-\([^-]*\)-\([^.]*\).*\$"
|
||||
ls -1 release_debs | head -n 1 > debname.tmp
|
||||
medley_release="medley-$(sed -e "s/${regex}/\1/" debname.tmp)"
|
||||
maiko_release="maiko-$(sed -e "s/${regex}/\2/" debname.tmp)"
|
||||
rm -f debname.tmp
|
||||
echo "MEDLEY_RELEASE=${medley_release}" >> ${GITHUB_ENV}
|
||||
echo "MAIKO_RELEASE=${maiko_release}" >> ${GITHUB_ENV}
|
||||
|
||||
# Set repo env variables
|
||||
- name: Set repo/docker env variables
|
||||
id: repo_env
|
||||
run: |
|
||||
REPO_NAME=${GITHUB_REPOSITORY#*/}
|
||||
echo "REPO_NAME=${REPO_NAME}" >> ${GITHUB_ENV}
|
||||
echo "repo_name=${REPO_NAME}" >> ${GITHUB_OUTPUT}
|
||||
DOCKER_NAMESPACE=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
|
||||
echo "DOCKER_NAMESPACE=${DOCKER_NAMESPACE}" >> ${GITHUB_ENV}
|
||||
echo "docker_namespace=${DOCKER_NAMESPACE}" >> ${GITHUB_OUTPUT}
|
||||
|
||||
# Get tag of latest Medley release.
|
||||
- name: Get Medley Release Information
|
||||
id: release_info
|
||||
uses: abatilo/release-info-action@v1.3.2
|
||||
with:
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: medley
|
||||
|
||||
# Get asset tars from latest Medley release
|
||||
- name: Download Release Assets
|
||||
uses: robinraju/release-downloader@v1.7
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/medley
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
latest: true
|
||||
fileName: "*"
|
||||
out-file-path: "release_tars"
|
||||
|
||||
# Get Maiko release information about latest Maiko Docker Image
|
||||
- name: Get info from latest Maiko image
|
||||
id: maiko_setup
|
||||
run: |
|
||||
docker pull ${DOCKER_NAMESPACE}/maiko:latest
|
||||
MAIKO_RELEASE=$(docker run --entrypoint /bin/bash ${DOCKER_NAMESPACE}/maiko:latest -c "echo \${MAIKO_RELEASE}")
|
||||
echo "MAIKO_RELEASE=${MAIKO_RELEASE}" >> ${GITHUB_ENV}
|
||||
echo "maiko_release=${MAIKO_RELEASE}" >> ${GITHUB_OUTPUT}
|
||||
|
||||
# Setup environment variables
|
||||
- name: Setup Environment Variables
|
||||
id: setup_env
|
||||
run: |
|
||||
RELEASE_TAG=${{ steps.release_info.outputs.latest_tag }}
|
||||
DOCKER_IMAGE=${DOCKER_NAMESPACE}/${REPO_NAME}
|
||||
repo_name="${GITHUB_REPOSITORY#*/}"
|
||||
docker_namespace="$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')"
|
||||
docker_image="${docker_namespace}/${repo_name}"
|
||||
if [ "${{ needs.inputs.outputs.draft }}" = "false" ];
|
||||
then DOCKER_TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${RELEASE_TAG#*-}_${MAIKO_RELEASE#*-}"
|
||||
else DOCKER_TAGS="${DOCKER_IMAGE}:draft"
|
||||
then
|
||||
docker_tags="${docker_image}:latest,${docker_image}:${MEDLEY_RELEASE#*-}_${MAIKO_RELEASE#*-}"
|
||||
platforms="linux/amd64,linux/arm64"
|
||||
else
|
||||
docker_tags="${docker_image}:draft"
|
||||
platforms="linux/amd64"
|
||||
fi
|
||||
echo "docker_tags=${DOCKER_TAGS}" >> ${GITHUB_OUTPUT}
|
||||
echo "docker_image=${DOCKER_IMAGE}" >> ${GITHUB_OUTPUT}
|
||||
echo "build_time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_OUTPUT}
|
||||
echo "release_tag=${RELEASE_TAG}" >> ${GITHUB_OUTPUT}
|
||||
echo "release_tag=${RELEASE_TAG}" >> ${GITHUB_ENV}
|
||||
echo "REPO_NAME=${repo_name}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_NAMESPACE=${docker_namespace}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_IMAGE=${docker_image}" >> ${GITHUB_ENV}
|
||||
echo "DOCKER_TAGS=${docker_tags}" >> ${GITHUB_ENV}
|
||||
echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}
|
||||
echo "PLATFORMS=${platforms}" >> ${GITHUB_ENV}
|
||||
#linux/amd64,linux/arm64,linux/arm/v7
|
||||
|
||||
# Setup the Docker Machine Emulation environment.
|
||||
- name: Set up QEMU
|
||||
@@ -217,17 +217,16 @@ jobs:
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
build-args: |
|
||||
BUILD_DATE=${{ steps.setup_env.outputs.build_time }}
|
||||
RELEASE_TAG=${{ steps.setup_env.outputs.release_tag }}
|
||||
MAIKO_RELEASE=${{ steps.setup_env.outputs.maiko_release }}
|
||||
DOCKER_NAMESPACE=${{ steps.repo_env.outputs.docker_namespace }}
|
||||
BUILD_DATE=${{ env.BUILD_DATE }}
|
||||
MEDLEY_RELEASE=${{ env.MEDLEY_RELEASE }}
|
||||
MAIKO_RELEASE=${{ env.MAIKO_RELEASE }}
|
||||
REPO_OWNER=${{ github.repository_owner }}
|
||||
context: ./release_tars
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
context: ./release_debs
|
||||
file: ./.github/workflows/Dockerfile_medley
|
||||
platforms: ${{ env.PLATFORMS }}
|
||||
# Push the result to DockerHub
|
||||
push: true
|
||||
tags: ${{ steps.setup_env.outputs.docker_tags }}
|
||||
tags: ${{ env.DOCKER_TAGS }}
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
186
.github/workflows/buildLoadup.yml
vendored
186
.github/workflows/buildLoadup.yml
vendored
@@ -49,6 +49,9 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: 'false'
|
||||
secrets:
|
||||
OIO_SSH_KEY:
|
||||
required: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -113,6 +116,8 @@ jobs:
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
#
|
||||
# Do the loadup
|
||||
#
|
||||
|
||||
@@ -120,6 +125,12 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
combined_release_tag: ${{ steps.job_outputs.outputs.COMBINED_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 }}
|
||||
|
||||
needs: [inputs, sentry]
|
||||
if: |
|
||||
needs.sentry.outputs.release_not_built == 'true'
|
||||
@@ -143,20 +154,6 @@ jobs:
|
||||
id: tag
|
||||
uses: ./../actions/release-tag-action
|
||||
|
||||
# Setup environment variables
|
||||
- name: Setup Environment Variables
|
||||
id: setup_env
|
||||
run: |
|
||||
echo "build_time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_OUTPUT}
|
||||
echo "TARBALL_DIR=installers/deb/tmp/tarballs" >>${GITHUB_ENV}
|
||||
echo "DEBS_DIR=installers/deb/debs" >>${GITHUB_ENV}
|
||||
echo "TARS_DIR=installers/deb/tars" >>${GITHUB_ENV}
|
||||
echo "MEDLEY_RELEASE_TAG=${RELEASE_TAG}" >>${GITHUB_ENV}
|
||||
|
||||
# Setup some needed dirs in workspace
|
||||
- name: Create work dirs
|
||||
run: mkdir -p ${TARBALL_DIR}
|
||||
|
||||
# Get Maiko release information, retrieves the name of the latest
|
||||
# release. Used to download the correct Maiko release
|
||||
- name: Get Maiko Release Information
|
||||
@@ -166,6 +163,33 @@ jobs:
|
||||
owner: ${{ github.repository_owner }}
|
||||
repo: maiko
|
||||
|
||||
# Setup environment variables & establish job outputs
|
||||
- name: Setup Environment Variables
|
||||
run: |
|
||||
echo "build_time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_OUTPUT}
|
||||
echo "TARBALL_DIR=installers/deb/tmp/tarballs" >>${GITHUB_ENV}
|
||||
echo "DEBS_DIR=installers/deb/debs" >>${GITHUB_ENV}
|
||||
echo "TARS_DIR=installers/deb/tars" >>${GITHUB_ENV}
|
||||
echo "MEDLEY_RELEASE_TAG=${RELEASE_TAG}" >>${GITHUB_ENV}
|
||||
echo "MAIKO_RELEASE_TAG=${{ steps.maiko.outputs.latest_tag }}" >>${GITHUB_ENV}
|
||||
- name: More Environment Variables
|
||||
run: |
|
||||
echo "MEDLEY_SHORT_RELEASE_TAG=${MEDLEY_RELEASE_TAG#medley-}" >>${GITHUB_ENV}
|
||||
echo "MAIKO_SHORT_RELEASE_TAG=${MAIKO_RELEASE_TAG#maiko-}" >>${GITHUB_ENV}
|
||||
- name: Even More Environment Variables
|
||||
run: |
|
||||
echo "COMBINED_RELEASE_TAG=${MEDLEY_SHORT_RELEASE_TAG}_${MAIKO_SHORT_RELEASE_TAG}" >>${GITHUB_ENV}
|
||||
- name: Establish job outputs
|
||||
id: job_outputs
|
||||
run: |
|
||||
echo "COMBINED_RELEASE_TAG=${COMBINED_RELEASE_TAG}" >> $GITHUB_OUTPUT;
|
||||
echo "MEDLEY_RELEASE_TAG=${MEDLEY_RELEASE_TAG}" >> $GITHUB_OUTPUT;
|
||||
echo "MEDLEY_SHORT_RELEASE_TAG=${MEDLEY_SHORT_RELEASE_TAG}" >> $GITHUB_OUTPUT;
|
||||
|
||||
# Setup some needed dirs in workspace
|
||||
- name: Create work dirs
|
||||
run: mkdir -p ${TARBALL_DIR}
|
||||
|
||||
# Download Maiko Release Assets
|
||||
- name: Download Release Assets
|
||||
uses: robinraju/release-downloader@v1.6
|
||||
@@ -174,11 +198,11 @@ jobs:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
latest: true
|
||||
out-file-path: ${{ env.TARBALL_DIR }}
|
||||
fileName: "${{ steps.maiko.outputs.latest_tag }}-linux.*.tgz"
|
||||
fileName: "${{ env.MAIKO_RELEASE_TAG }}-linux.*.tgz"
|
||||
|
||||
- name: Untar Maiko Release for use in loadup
|
||||
run: |
|
||||
tar -xzf "${TARBALL_DIR}/${{ steps.maiko.outputs.latest_tag }}-linux.x86_64.tgz"
|
||||
tar -xzf "${TARBALL_DIR}/${{ env.MAIKO_RELEASE_TAG }}-linux.x86_64.tgz"
|
||||
|
||||
# Checkout Notecards and tar it in the tarballsdir
|
||||
- name: Checkout Notecards
|
||||
@@ -192,7 +216,7 @@ jobs:
|
||||
cd ..
|
||||
tar cfz medley/${TARBALL_DIR}/notecards.tgz notecards
|
||||
|
||||
#
|
||||
# Install vnc
|
||||
- name: Install vnc
|
||||
run: sudo apt-get update && sudo apt-get install -y tightvncserver
|
||||
|
||||
@@ -202,7 +226,7 @@ jobs:
|
||||
export DISPLAY=":0"
|
||||
PATH="$PWD/maiko:$PATH"
|
||||
scripts/loadup-all.sh -apps
|
||||
|
||||
|
||||
- name: Build loadups release tar
|
||||
run: |
|
||||
cd ..
|
||||
@@ -240,11 +264,16 @@ jobs:
|
||||
medley/internal
|
||||
|
||||
|
||||
# Build the deb files as well as the tgz files
|
||||
- name: Build .deb files for 3 architectures
|
||||
id: debs
|
||||
run: |
|
||||
cd installers/deb
|
||||
./build_deb.sh
|
||||
debs_filename_base=$(./build_deb.sh)
|
||||
echo "DEBS_FILENAME_BASE=${debs_filename_base}" >> $GITHUB_ENV;
|
||||
echo "DEBS_FILENAME_BASE=${debs_filename_base}" >> $GITHUB_OUTPUT;
|
||||
|
||||
# Push the release up to github releases
|
||||
- name: Delete existing release with same tag (if any)
|
||||
uses: cb80/delrel@latest
|
||||
with:
|
||||
@@ -267,41 +296,114 @@ jobs:
|
||||
generateReleaseNotes: true
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Update the downloads page and the man page to the OIO satic page host
|
||||
|
||||
#
|
||||
# Create the Windows installer, push it up to the release on github and
|
||||
# update the downloads page on OIO
|
||||
#
|
||||
windows_installer:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
needs: [inputs, sentry, loadup]
|
||||
if: |
|
||||
needs.sentry.outputs.release_not_built == 'true'
|
||||
|| needs.inputs.outputs.force == 'true'
|
||||
|
||||
steps:
|
||||
# Checkout latest commit
|
||||
- name: Checkout Medley
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Store the values output from loadup job as environment variables
|
||||
- name: Environment Variables
|
||||
shell: powershell
|
||||
run: |
|
||||
maiko_release_tag="${{ steps.maiko.outputs.latest_tag }}"
|
||||
medley_short_release_tag="${MEDLEY_RELEASE_TAG#medley-}"
|
||||
full_release_filename="${MEDLEY_RELEASE_TAG/medley/medley-full}_${maiko_release_tag#maiko-}"
|
||||
# Need info about where github stores assets because draft releases are not tagged
|
||||
release_url="${{ steps.push_release.outputs.html_url }}"
|
||||
github_subdir="$( echo "${release_url}" | sed -e "s#^.*/\([^/]\+\)\$#\1#g" )"
|
||||
#
|
||||
$crt="${{ needs.loadup.outputs.combined_release_tag }}"
|
||||
echo "COMBINED_RELEASE_TAG=$crt" | 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 }}"
|
||||
echo "MEDLEY_SHORT_RELEASE_TAG=$msrt" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
$debs="${{ needs.loadup.outputs.debs_filename_base }}"
|
||||
echo "DEBS_FILENAME_BASE=$debs" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
# Download vnc viewer
|
||||
- name: Download vncviewer
|
||||
shell: powershell
|
||||
run: |
|
||||
$url = "https://sourceforge.net/projects/tigervnc/files/stable/1.12.0/vncviewer64-1.12.0.exe"
|
||||
$output = "installers\win\vncviewer64-1.12.0.exe"
|
||||
(New-Object System.Net.WebClient).DownloadFile($url, $output)
|
||||
|
||||
# Run iscc.exe to compile the installer
|
||||
- name: Compile medley.iss
|
||||
shell: powershell
|
||||
run: |
|
||||
iscc installers\win\medley.iss
|
||||
$filename="medley-install_${env:COMBINED_RELEASE_TAG}_x64.exe"
|
||||
echo "INSTALLER_FILENAME=$filename" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
# Upload windows installer to release
|
||||
- name: Upload windows installer to release
|
||||
id: push
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
artifacts: installers/win/${{ env.INSTALLER_FILENAME }}
|
||||
tag: ${{ env.MEDLEY_RELEASE_TAG }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
omitBodyDuringUpdate: true
|
||||
omitDraftDuringUpdate: true
|
||||
omitNameDuringUpdate: true
|
||||
omitPrereleaseDuringUpdate: true
|
||||
|
||||
# Install the OpenSSH Client
|
||||
- name: Install the OpenSSH Client
|
||||
shell: powershell
|
||||
run: |
|
||||
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
|
||||
|
||||
# Update the downloads page and the man page on OIO
|
||||
- name: Update the downloads page and the man page to the OIO static page host
|
||||
shell: bash
|
||||
run: |
|
||||
# Figure out filenames
|
||||
download_url="${{ steps.push.outputs.html_url }}"
|
||||
download_url="${download_url/\/tag\//\/download\/}"
|
||||
local_template="installers/downloads_page/medley_downloads.html"
|
||||
local_filename="medley_downloads.html"
|
||||
local_manpath="docs/man-page/man_medley.html"
|
||||
if [ "${{ needs.inputs.outputs.draft }}" = "true" ];
|
||||
then
|
||||
remote_filename="draft_downloads"
|
||||
remote_manname="man_draft.html"
|
||||
else
|
||||
remote_filename="${local_filename%.html}"
|
||||
remote_manname="man_medley.html"
|
||||
fi
|
||||
remote_filepath="/srv/oio/static/${remote_filename}"
|
||||
remote_manpath="/srv/oio/static/${remote_manname}"
|
||||
# Fill in downloads page template
|
||||
sed \
|
||||
-e "s/@@@FULL.RELEASE.FILENAME@@@/${full_release_filename}/g" \
|
||||
-e "s/@@@GITHUB.SUBDIR@@@/${github_subdir}/g" \
|
||||
-e "s/@@@MEDLEY.SHORT.RELEASE.TAG@@@/${medley_short_release_tag}/g" \
|
||||
-e "s/@@@MEDLEY.SHORT.RELEASE.TAG@@@/${MEDLEY_SHORT_RELEASE_TAG}/g" \
|
||||
-e "s~@@@DOWNLOAD_URL@@@~${download_url}~g" \
|
||||
-e "s/@@@DEBS.FILENAME.BASE@@@/${DEBS_FILENAME_BASE}/g" \
|
||||
-e "s/@@@WINDOWS.INSTALLER.FILENAME@@@/${INSTALLER_FILENAME}/g" \
|
||||
< "${local_template}" > "${local_filename}"
|
||||
local_manpath="docs/man-page/man_medley.html"
|
||||
remote_manpath="/srv/oio/static/man_medley.html"
|
||||
# Create sftp instruction file
|
||||
echo "-rm ${remote_filepath}.oldold" > batch
|
||||
echo "-rename ${remote_filepath}.old ${remote_filepath}.oldold" >> batch
|
||||
echo "-rename ${remote_filepath}.html ${remote_filepath}.old" >> batch
|
||||
echo "-put ${local_filename} ${remote_filepath}.html" >> batch
|
||||
echo "-put ${local_manpath} ${remote_manpath}" >> batch
|
||||
# Do the sftp
|
||||
eval $(ssh-agent)
|
||||
ssh-add - <<< "${SSH_KEY}"
|
||||
sftp -o StrictHostKeyChecking=no -b batch ubuntu@online.interlisp.org
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.OIO_SSH_KEY }}
|
||||
|
||||
|
||||
|
||||
######################################################################################
|
||||
@@ -316,7 +418,7 @@ jobs:
|
||||
outputs:
|
||||
build_successful: ${{ steps.output.outputs.build_successful }}
|
||||
|
||||
needs: [inputs, sentry, loadup]
|
||||
needs: [inputs, sentry, loadup, windows_installer]
|
||||
|
||||
steps:
|
||||
# Checkout the actions for this repo owner
|
||||
@@ -340,3 +442,21 @@ jobs:
|
||||
echo "build_successful='true'" >> $GITHUB_OUTPUT
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
|
||||
# - name: Download the Windows installer created in windows job
|
||||
# uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: windows_installer
|
||||
# path: installers/win
|
||||
|
||||
# - name: Rename the Windows installer w/ version tag
|
||||
# run: |
|
||||
# maiko_release_tag="${{ steps.maiko.outputs.latest_tag }}"
|
||||
# combined_release_tag="${MEDLEY_RELEASE_TAG#medley-}_${maiko_release_tag#maiko-}"
|
||||
# windows_installer_filename="medley_install_${combined_release_tag}_x64.exe"
|
||||
# cd installers/win
|
||||
# mv medley_install_vXXXVERSIONXXX_x64.exe "${windows_installer_filename}"
|
||||
# echo "WINDOWS_INSTALLER_FILENAME=${windows_installer_filename}" >>${GITHUB_ENV}
|
||||
|
||||
|
||||
5
.github/workflows/buildReleaseInclDocker.yml
vendored
5
.github/workflows/buildReleaseInclDocker.yml
vendored
@@ -94,7 +94,9 @@ jobs:
|
||||
with:
|
||||
draft: ${{ needs.inputs.outputs.draft }}
|
||||
force: ${{ needs.inputs.outputs.force }}
|
||||
|
||||
secrets:
|
||||
OIO_SSH_KEY: ${{ secrets.OIO_SSH_KEY }}
|
||||
|
||||
|
||||
######################################################################################
|
||||
|
||||
@@ -109,6 +111,5 @@ jobs:
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
|
||||
######################################################################################
|
||||
|
||||
|
||||
23
.github/workflows/testLogin.yml
vendored
23
.github/workflows/testLogin.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: 'Test Docker Login'
|
||||
|
||||
# Run this workflow on ...
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
login_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: only_step
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user