-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
auricularr.yml
140 lines (112 loc) · 5.68 KB
/
auricularr.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
image: archlinux
packages:
- jq
- python-jq
- devtools
- nvchecker
environment:
packages: [autobrr, bazarr, bazarr-beta, bitmagnet, bitmagnet-beta, bitmagnet-bin, jellyseerr, lidarr, lidarr-bin, lidarr-develop, lidarr-develop-bin, lidarr-nightly-bin, lunasea-bin, ombi, ombi-bin, ombi-develop, ombi-develop-bin, prowlarr, prowlarr-bin, prowlarr-develop, prowlarr-develop-bin, prowlarr-nightly-bin, radarr, radarr-bin, radarr-develop, radarr-develop-bin, radarr-nightly-bin, readarr-develop, readarr-develop-bin, readarr-nightly-bin, recyclarr, recyclarr-bin, sonarr, sonarr-bin, sonarr-develop, sonarr-develop-bin, whisparr-nightly-bin]
GPG_TTY: /dev/pts/0
secrets:
- 5cd32654-71c1-4163-b612-92c4188537b7
- 3ace5c97-3ff2-4ba7-a734-6e54e3baf050
- fcdf0051-d5ad-41a0-9337-1595a7fb8784
tasks:
- system_update: |
yay -Syu --noconfirm
- system_configure_ssh: |
mkdir -p ~/.ssh/
cat <<EOF > ~/.ssh/known_hosts
aur.archlinux.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLMiLrP8pVi5BFX2i3vepSUnpedeiewE5XptnUnau+ZoeUOPkpoCgZZuYfpaIQfhhJJI5qgnjJmr4hyJbe/zxow=
aur.archlinux.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKF9vAFWdgm9Bi8uc+tYRBmXASBb5cB5iZsB7LOWWFeBrLp3r14w0/9S2vozjgqY5sJLDPONWoTTaVTbhe3vwO8CBKZTEt1AcWxuXNlRnk9FliR1/eNB9uz/7y1R0+c1Md+P98AJJSJWKN12nqIDIhjl2S1vOUvm7FNY43fU2knIhEbHybhwWeg+0wxpKwcAd/JeL5i92Uv03MYftOToUijd1pqyVFdJvQFhqD4v3M157jxS5FTOBrccAEjT+zYmFyD8WvKUa9vUclRddNllmBJdy4NyLB8SvVZULUPrP3QOlmzemeKracTlVOUG1wsDbxknF1BwSCU7CmU6UFP90kpWIyz66bP0bl67QAvlIc52Yix7pKJPbw85+zykvnfl2mdROsaT8p8R9nwCdFsBc9IiD0NhPEHcyHRwB8fokXTajk2QnGhL+zP5KnkmXnyQYOCUYo3EKMXIlVOVbPDgRYYT/XqvBuzq5S9rrU70KoI/S5lDnFfx/+lPLdtcnnEPk=
aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIcN
EOF
- system_configure_git: |
git config --global user.email '[email protected]'
git config --global user.name 'txtsd'
git config --global protocol.version 2
git config --global http.version 'HTTP/2'
git config --global init.defaultBranch master
git config --global user.signingkey 97C8848C2E4063CB
git config --global commit.gpgsign true
git config --global push.default 'simple'
git config --global push.gpgsign 'if-asked'
git config --global tag.gpgsign true
git config --global format.signOff no
git config --global gpg.program gpg2
# git ignore --global '*.log'
- system_configure_gpgagent: |
mkdir -p ~/.gnupg/
echo use-agent >> ~/.gnupg/gpg.conf
echo pinentry-mode loopback >> ~/.gnupg/gpg.conf
echo default-cache-ttl 14400 >> ~/.gnupg/gpg-agent.conf
echo max-cache-ttl 14400 >> ~/.gnupg/gpg-agent.conf
echo allow-preset-passphrase >> ~/.gnupg/gpg-agent.conf
echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf
gpgconf -R gpg-agent
- system_configure_gpg: |
gpg --batch --pinentry-mode loopback --passphrase-file ~/.gpgkeypassphrase --import ~/.gpgkey
- build_test_publish: |
cat ~/.gpgkeypassphrase | /usr/lib/gnupg/gpg-preset-passphrase --preset 6763F413B8C1DC577FCB62F4FAD4DB216AE194C4
for repo in ${packages[@]}; do
git clone "ssh://[email protected]/${repo}.git"
cd "${repo}" || exit
(env TERM=xterm pkgctl version check > /dev/null 2>&1) && true
exit_code_1=$?
if [ ${exit_code_1} == 2 ]; then
echo 'New version available!'
source PKGBUILD
env TERM=xterm pkgctl version upgrade
(pkgctl build) && true
exit_code_2=$?
if [ ${exit_code_2} == 0 ]; then
yay -U "${repo}"-*.pkg.tar.zst --noconfirm
service_name=${repo%-bin}
service_name=${service_name%-beta}
service_name=${service_name%-develop}
service_name=${service_name%-nightly}
sudo systemctl start "${service_name}"
sleep 30
case ${service_name} in
autobrr)
grep -Gm1 'Starting API tcp server\. Listening on' <(sudo journalctl -xeu "${service_name}" --follow)
;;
bazarr)
grep -Gm1 '.*BAZARR is started and waiting for requests on.*' <(sudo journalctl -xeu "${service_name}" --follow)
;;
bitmagnet)
yay -S --noconfirm postgresql
sudo systemctl start postgresql
grep -Gm1 'started worker\s*{"key": "http_server"}' <(sudo journalctl -xeu "${service_name}" --follow)
sudo systemctl stop postgresql
;;
jellyseerr)
grep -Gm1 '\[info\]\[Server\]: Server ready on port' <(sudo journalctl -xeu "${service_name}" --follow)
;;
lunasea) ;;
ombi)
grep -Gm1 'We are running on ' <(sudo journalctl -xeu ombi --follow)
;;
recyclarr)
grep -Gm1 'recyclarr\.service: Deactivated successfully\.' <(sudo journalctl -xeu "${service_name}" --follow)
;;
*)
grep -Gm1 'Application started\. Press Ctrl+C to shut down\.' <(sudo journalctl -xeu "${service_name}" --follow)
;;
esac
unset pkgname
unset pkgver
unset pkgrel
source PKGBUILD
git add -v PKGBUILD .SRCINFO
git commit --status -S -m "upgpkg: ${pkgname} ${pkgver}-${pkgrel}"
git push
sudo systemctl stop "${service_name}"
yay -R "${pkgname}" --noconfirm
(yay -R "${pkgname}-debug" --noconfirm) && true
fi
else
echo 'This is the latest version'
fi
cd ..
done