-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.build.yml
64 lines (63 loc) · 1.96 KB
/
.build.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
# SPDX-FileCopyrightText: © nobody
# SPDX-License-Identifier: CC0-1.0
---
image: archlinux
packages:
- docker
- docker-buildx
- git
- go
- protobuf
- redocly
- reuse
- scdoc
sources:
- "https://git.sr.ht/~mpldr/uniview"
secrets:
- ba45943f-f792-4287-87a5-09fdb803a8dd # GitHub SSH Key
- fb78c647-e9f5-4922-b804-7c795da4d56a # GitHub known_hosts
- 620e79ed-2089-4231-ba88-42a5bb352973 # Container push key
tasks:
- prepare: |
sudo usermod -aG docker $(whoami)
sudo systemctl start docker
set +e
docker_ps_return=1
until [ ${docker_ps_return} -eq 0 ]; do
sudo docker ps >/dev/null 2>&1
docker_ps_return=$?
sleep 1
done
set -e
- docker-build: |
cd uniview
touch internal/client/index.html
docker build .
- reuse-compliance: |
cd uniview
reuse lint
- check-authors-file: |
cd uniview
make AUTHORS
if git status --porcelain | grep AUTHORS | grep "^ M" > /dev/null; then
echo -e "\n\nAUTHORS file is not up to date!"
exit 1
fi
- stop-unless-push: |
if [ "$BUILD_SUBMITTER" != "git.sr.ht" ]; then complete-build; fi
- mirror-to-github: |
git clone --mirror https://git.sr.ht/~mpldr/uniview
cd uniview.git
git push --mirror [email protected]:mpldr/uniview.git
- update-container: |
cd ~/uniview
if git describe --exact-match HEAD; then
docker build -t "c8n.io/mpldr/uniview:$(git describe --exact-match HEAD)" -t "c8n.io/mpldr/uniview:latest" -t "c8n.io/mpldr/uniview:devel" .
docker push "c8n.io/mpldr/uniview:$(git describe --exact-match HEAD)"
docker push "c8n.io/mpldr/uniview:latest"
docker push "c8n.io/mpldr/uniview:devel"
else
docker build -t "c8n.io/mpldr/uniview:$(git describe HEAD)" -t "c8n.io/mpldr/uniview:devel" .
docker push "c8n.io/mpldr/uniview:$(git describe --always HEAD)"
docker push "c8n.io/mpldr/uniview:devel"
fi