From a63152bc561cceb26e8df9470112a1e15fa0bfd0 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 3 Jan 2022 11:05:18 +0100 Subject: [PATCH] submit-builds: add manifest override, edge manifest --- build-edge.yml | 30 ++++++++++++++++++++++++++++++ submit-builds | 8 ++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 build-edge.yml diff --git a/build-edge.yml b/build-edge.yml new file mode 100644 index 0000000..e1a5823 --- /dev/null +++ b/build-edge.yml @@ -0,0 +1,30 @@ +image: alpine/edge +repositories: + sr.ht: > + https://mirror.sr.ht/alpine/edge/sr.ht/ + https://mirror.sr.ht/alpine/alpine%40sr.ht.rsa.pub + alpine@sr.ht.rsa.pub +packages: + - openssl + - rsync +environment: + REPOSITORY: edge + remote: deploy@mirror.sr.ht + remote_path: /var/www/mirror.sr.ht/alpine + packages: [] +sources: + - https://git.sr.ht/~sircmpwn/sr.ht-apkbuilds +secrets: + - fa00a8d3-7b63-42d5-8060-3bb31c3e3018 # ssh deploy key + - d0adc1d4-af78-4852-920f-1134392f5d10 # package signing key +tasks: + - setup: | + cd sr.ht-apkbuilds + ./pkgkit add-repo -s sr.ht ~/.abuild/alpine@sr.ht.rsa + - build: | + cd sr.ht-apkbuilds + ./pkgkit build -cu "${packages[@]}" + - deploy: | + cd sr.ht-apkbuilds + echo "StrictHostKeyChecking=no" >> ~/.ssh/config + ./pkgkit upload "$remote" "$remote_path" "${packages[@]}" diff --git a/submit-builds b/submit-builds index c5f7b68..de6c58d 100755 --- a/submit-builds +++ b/submit-builds @@ -1,12 +1,13 @@ #!/bin/sh upstream=https://builds.sr.ht +manifest=build.yml if [ -e ~/.config/sr.ht ] then . ~/.config/sr.ht fi -while getopts u:t:h flag +while getopts m:u:t:h flag do case $flag in u) @@ -15,6 +16,9 @@ do t) bearer_token="$OPTARG" ;; + m) + manifest="$OPTARG" + ;; h) echo "Usage: $0 [-u https://upstream...] [-t oauth token] " exit 0 @@ -40,7 +44,7 @@ do fi done -vars="$(sed "s/packages: \\[\\]/packages: [$builds]/g" < build.yml | jq -sR '{ +vars="$(sed "s/packages: \\[\\]/packages: [$builds]/g" < $manifest | jq -sR '{ "manifest": ., "tags": ["sr.ht-apkbuilds"], "note": "'"$note"'" -- 2.45.2