aboutsummaryrefslogtreecommitdiff
path: root/build.yml
blob: 7b2adf7c05a341c27875ea6143209169a1addb03 (plain)
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
image: alpine/3.15
repositories:
  gabrielgio.me: >
    https://artifacts.gabrielgio.me/repo/
    https://artifacts.gabrielgio.me/repo/mail%40gabrielgio.me-62ddc4dc.rsa.pub
    mail@gabrielgio.me-62ddc4dc.rsa.pub
packages:
  - openssl
  - rsync
  - alpine-sdk
environment:
  deploy: builds@gabrielgio.me
  target: artifacts.gabrielgio.me/repo/
  packages: ["genpass", "midr"]
sources:
  - https://git.sr.ht/~gabrielgio/apkbuilds
secrets:
  - 008c4f67-b864-47f8-9790-cd32f2ae8516
  - df9d57f4-43bb-4084-a748-dbf02848bdd0
tasks:
  - setup: |
      echo "PACKAGER_PRIVKEY=\"/home/build/.abuild/mail@gabrielgio.me-62ddc4dc.rsa\"" > ~/.abuild/abuild.conf
  - build: |
      cd apkbuilds
      for pkg in "${packages[@]}"; do
        cd "$pkg"
        abuild -r
        cd ..
      done
  - deploy: |
      sshopts="ssh -o StrictHostKeyChecking=no"
      rsync --rsh="$sshopts" -rP ~/packages/apkbuilds/ $deploy:/var/www/$target