-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.sh
executable file
·38 lines (31 loc) · 908 Bytes
/
build.sh
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
#!/bin/bash
# Repository Login
echo -e "### login to docker.io ###"
podman login docker.io
echo -e "\n### login to quay.io ###"
podman login quay.io
# Building Image
CURDIR=$PWD
cd Containerfile.d
for f in Containerfile*
do
echo -e "\n### Build ${f/Containerfile./} ###"
buildah build --layers=true -t yt-dlp:"${f/Containerfile./}" -f $f
done
# Test
for f in Containerfile*
do
echo -e "\n### Run ${f/Containerfile./} ###"
podman run --rm yt-dlp:${f/Containerfile./} --version
done
# Push
for f in Containerfile*
do
echo -e "\n### Push yt-dlp:${f/Containerfile./} ###"
podman push yt-dlp:${f/Containerfile./} docker.io/tnk4on/yt-dlp:${f/Containerfile./} --format v2s2
if [ "${f/Containerfile./}" = "alpine-static" ]; then
echo -e "\n### Push yt-dlp:latest"
podman push yt-dlp:${f/Containerfile./} docker.io/tnk4on/yt-dlp --format v2s2
fi
done
cd $CURDIR