Files
alpine-cli/.build.yml
Jason Swank 1427789f34 ci/cf
2026-02-06 02:04:04 +00:00

48 lines
1.3 KiB
YAML

image: alpine/latest
secrets:
- 0f9c437f-5dfc-49f1-abfb-0030f265c018
- 0ee986ff-5686-43cd-ac3a-1fe5b2e5dd8f
- f523ee29-5ef8-490f-8903-43ad7c49060b
- 130adee5-3a8f-4035-8cad-e3d044be2961
sources:
- git@git.sr.ht:~jswank/alpine-cli
packages:
- podman
- iptables
- runit
- go-task
- qemu-openrc
- qemu-modules
- qemu-aarch64
- jq
tasks:
- prep: |
# cgroups need to be running in order to run podman
sudo rc-service cgroups start
# qemu binfmt is required for cross-platform builds
sudo rc-service qemu-binfmt start
# allow rootless podman
echo $USER:100000:65536 | sudo tee /etc/subuid
echo $USER:100000:65536 | sudo tee /etc/subgid
sleep 1
# build the image using the just recipe
# - sudo (-u root) is required to run podman without more setup
- build: |
cd alpine-cli
go-task build
# publish the image using task
# - set environment variables from the ~/.envdir directory. see
# http://smarden.org/runit/chpst.8.html for details on chpst
- publish: |
cd alpine-cli
chpst -e ~/.envdir go-task publish
chpst -e ~/.envdir go-task REGISTRY=docker.io REGISTRY_PASS_VAR=DH_PAT publish
chpst -e ~/.envdir go-task REGISTRY=quay.io REGISTRY_PASS_VAR=QUAY_PAT publish