i think mvp
cicd / ci (push) Failing after 11s
Details
cicd / ci (push) Failing after 11s
Details
parent
e040f74873
commit
09ce3d9d9b
27
build.sh
27
build.sh
|
|
@ -4,7 +4,27 @@ main() {
|
|||
set -eo pipefail
|
||||
|
||||
cd_work_d
|
||||
ensure_ytdlp2STRM_git
|
||||
|
||||
ytdlp2STRM_d=./ytdlp2STRM
|
||||
ensure_ytdlp2STRM_git "$ytdlp2STRM_d"
|
||||
|
||||
head_ts="$(cd "$ytdlp2STRM_d"; git log -n 1 --format=%as)"
|
||||
echo head_ts=$head_ts
|
||||
|
||||
yt_dlp_latest="$(pip3 index versions yt-dlp | grep LATEST | awk '{print $NF}')"
|
||||
echo yt_dlp_latest=$yt_dlp_latest
|
||||
|
||||
img=registry-app.inhome.blapointe.com:5001/bel/ytdlp2strm
|
||||
tag=${head_ts}-${yt_dlp_latest}
|
||||
if docker pull $img:$tag; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "$ytdlp2STRM_d"
|
||||
docker build -t "$img:$tag" .
|
||||
docker tag "$img:$tag" "$img:latest"
|
||||
$DEBUG docker push "$img:$tag"
|
||||
$DEBUG docker push "$img:latest"
|
||||
}
|
||||
|
||||
cd_work_d() {
|
||||
|
|
@ -19,9 +39,10 @@ cd_work_d() {
|
|||
}
|
||||
|
||||
ensure_ytdlp2STRM_git() {
|
||||
if [ ! -d ytdlp2STRM ]; then
|
||||
if [ ! -d "$1" ]; then
|
||||
git clone --depth=1 \
|
||||
https://github.com/fe80Grau/ytdlp2STRM.git
|
||||
https://github.com/fe80Grau/ytdlp2STRM.git \
|
||||
"$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue