Cache FFmpeg #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cache FFmpeg | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 3 * * 6' # at 03:00 on Saturday | |
jobs: | |
build: | |
strategy: | |
matrix: | |
arch: | |
- amd64 | |
- arm64 | |
name: Get FFmpeg (${{ matrix.arch }}) | |
runs-on: ubuntu-latest | |
if: github.repository == 'opencast/opencast' | |
steps: | |
- name: Install s3cmd | |
run: | | |
set -eu | |
sudo apt update -q | |
sudo apt install -y -q s3cmd | |
- name: Download FFmpeg | |
run: | | |
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-${{ matrix.arch }}-static.tar.xz | |
- name: Unpack FFmpeg | |
run: | | |
tar xvf ffmpeg-release-${{ matrix.arch }}-static.tar.xz | |
- name: Repack FFmpeg | |
run: | | |
set -eu | |
NAME="$(ls -d ffmpeg-*-static)" | |
tar cfJ "${NAME}.tar.xz" "${NAME}" | |
- name: Configure s3cmd | |
uses: lkiesow/configure-s3cmd@v1 | |
with: | |
host: ${{ secrets.S3_HOST }} | |
access_key: ${{ secrets.S3_ACCESS_KEY }} | |
secret_key: ${{ secrets.S3_SECRET_KEY }} | |
- name: Upload tarball | |
run: | | |
s3cmd put -P *.tar.xz s3://opencast-ffmpeg-static/ |