forked from opencast/opencast
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.17 KB
/
store-ffmpeg-builds.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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/