1
0
Fork 0
forked from External/mediamtx

Save a hash of the hls.min.js release (#3464)

This ensures the downloaded hls.js matches exactly and removes a dependency on cdn.jsdelivr.net
This commit is contained in:
Bouke van der Bijl 2024-06-17 23:15:18 +02:00 committed by GitHub
parent 7dcfd2e46d
commit dfa2e81e61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 41 additions and 8 deletions

View file

@ -19,10 +19,13 @@ jobs:
&& git config user.email bot@mediamtx
&& ((git checkout deps/hlsjs && git rebase ${GITHUB_REF_NAME}) || git checkout -b deps/hlsjs)
- run: >
- run: |
set -e
VERSION=$(curl -s https://api.github.com/repos/video-dev/hls.js/releases?per_page=1 | grep tag_name | sed 's/\s\+"tag_name": "\(.\+\)",/\1/')
&& echo $VERSION > internal/servers/hls/hlsjsdownloader/VERSION
&& echo VERSION=$VERSION >> $GITHUB_ENV
HASH=$(curl -sL https://github.com/video-dev/hls.js/releases/download/$VERSION/release.zip -o- | sha256sum | cut -f1 -d ' ')
echo $VERSION > internal/servers/hls/hlsjsdownloader/VERSION
echo $HASH > internal/servers/hls/hlsjsdownloader/HASH
echo VERSION=$VERSION >> $GITHUB_ENV
- id: check_repo
run: >