Skip to content

Commit

Permalink
Add installer for Zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
iainelder committed May 9, 2024
1 parent 702a233 commit 481a62a
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/zoom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Zoom
on:
push:
paths:
- programs/zoom/install.bash
- .github/workflows/Zoom.yml
schedule:
# Not at the start of an hour or a day to decreate the chance of delay.
# See schedule documentation.
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: "17 5 * * *"

workflow_dispatch:

jobs:
test_idempotent_installation:

strategy:
fail-fast: false
matrix:
os:
- "ubuntu:20.04"
- "ubuntu:22.04"

runs-on: ubuntu-latest
container:
image: "${{ matrix.os }}"

steps:

- name: Check out code
uses: actions/checkout@v4

- name: Prepare Docker
run: ./scripts/prepare_docker.bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Zoom
shell: su norm --command "bash --login {0}"
run: programs/zoom/install.bash

- name: Install Zoom again (test idempotency)
shell: su norm --command "bash --login {0}"
run: programs/zoom/install.bash
30 changes: 30 additions & 0 deletions programs/zoom/install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Name: Zoom
# https://us05web.zoom.us/download
# deb-get supports Zoom. You should use that instead.
# https://github.com/wimpysworld/deb-get/tree/main/01-main

set -euxo pipefail

cd "$(mktemp --dir)"

sudo apt-get update

# Installer dependencies
sudo apt-get --assume-yes install \
curl \
jq \
wget

version=$(
curl -Ss 'https://us05web.zoom.us/rest/download?os=linux' \
| jq -r '.result.downloadVO.zoom.version'
)

wget "https://us05web.zoom.us/client/$version/zoom_amd64.deb"

# "Fix broken" really means "install missing dependencies".
sudo apt-get install --yes --fix-broken ./zoom_amd64.deb

apt-cache show zoom | grep Version

0 comments on commit 481a62a

Please sign in to comment.