ref: 0dbb5248276e2ed6af3f5be47d0ceda06bf31a69 paste.sr.ht/.builds/alpine.yml -rw-r--r-- 1.4 KiB View raw
                                                                                
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
image: alpine/3.10
repositories:
  sr.ht: >
    https://mirror.sr.ht/alpine/v3.10/sr.ht/
    https://mirror.sr.ht/alpine/alpine%40sr.ht.rsa.pub
    alpine@sr.ht.rsa.pub
packages:
  - rsync
sources:
  - https://git.sr.ht/~sircmpwn/paste.sr.ht
  - https://git.sr.ht/~sircmpwn/sr.ht-apkbuilds
environment:
  project: paste.sr.ht
  remote: deploy@mirror.sr.ht
  remote_path: /var/www/mirror.sr.ht/alpine
  master: deploy@paste.sr.ht
secrets:
  - fa00a8d3-7b63-42d5-8060-3bb31c3e3018 # ssh deploy key
  - d0adc1d4-af78-4852-920f-1134392f5d10 # package signing key
tasks:
  - archive: |
      cd ${project}
      pkgver=$(~/sr.ht-apkbuilds/pkgkit pkgver)
      echo "pkgver=$pkgver" >> ~/.buildenv
      git archive \
        -o ~/sr.ht-apkbuilds/sr.ht/${project}/${project}-$pkgver.tar.gz \
        --prefix=${project}-$pkgver/ HEAD
  - pkgkit: |
      cd sr.ht-apkbuilds
      ./pkgkit add-repo -s sr.ht ~/.abuild/alpine@sr.ht.rsa
      cd sr.ht/$project
      sed -e 's?::https://git.sr.ht/.*archive.*??g' -i APKBUILD
  - package: |
      cd sr.ht-apkbuilds
      ./pkgkit build -cuv "$pkgver" "$project"
      cd ~/$project
      git describe --exact-match HEAD || complete-build
  - publish: |
      cd sr.ht-apkbuilds
      echo "StrictHostKeyChecking=no" >> ~/.ssh/config
      ./pkgkit upload "$remote" "$remote_path" "$project"
  - deploy: |
      ssh $master doas apk upgrade -U
      ssh $master doas service $project restart