~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/.builds/alpine.yml -rw-r--r-- 1.5 KiB
72548bd7Drew DeVault API: Updates per core-go auth changes 11 months ago
                                                                                
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
image: alpine/3.14
repositories:
  sr.ht: >
    https://mirror.sr.ht/alpine/v3.14/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/meta.sr.ht
  - https://git.sr.ht/~sircmpwn/sr.ht-apkbuilds
environment:
  project: meta.sr.ht
  remote: deploy@mirror.sr.ht
  remote_path: /var/www/mirror.sr.ht/alpine
  master: deploy@meta.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/.*pkgname/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 -t $master doas service $project restart
      ssh -t $master doas service $project-api restart