M .build.yml => .build.yml +6 -11
@@ 10,21 10,16 @@ packages:
- go
- podman
tasks:
-- build: |
- cd borgbase-exporter
- make
-- test: |
- cd borgbase-exporter
- make test
- podman-prep: |
- sudo sysctl kernel.unprivileged_userns_clone=1
- sudo touch /etc/subuid /etc/subgid
- sudo usermod --add-subuids 165536-231072 --add-subgids 165536-231072 build
+ # Otherwise fails with 'no registry in registries.conf'
echo 'unqualified-search-registries = ["docker.io"]' | sudo tee /etc/containers/registries.conf.d/docker.conf
+- build: |
+ cd borgbase-exporter
+ sudo podman build -t quay.io/tomleb/borgbase-exporter:latest .
- push: |
+ cd borgbase-exporter
sudo podman login --authfile ~/.docker/config.json quay.io
- cd mkproof-proxy-webhook
- make image-push PODMAN="sudo REGISTRY_AUTH_FILE=$HOME/.docker/config.json podman" IMG=quay.io/tomleb/mkproof-proxy-webhook:latest
+ sudo podman push quay.io/tomleb/borgbase-exporter:latest
triggers:
- action: email
condition: always
M Dockerfile => Dockerfile +1 -1
@@ 8,7 8,7 @@ RUN go mod download
COPY . /go/src/git.sr.ht/~tomleb/borgbase-exporter
-RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"'
+RUN CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' ./cmd/borgbase-exporter
M README.md => README.md +1 -0
@@ 3,6 3,7 @@
borgbase-exporter is a [Prometheus] exporter that exposes information about
[borgbase] repositories.
+[Prometheus]: https://prometheus.io/
[borgbase]: https://www.borgbase.com/
It polls [borgbase's GraphQL API] at a specified interval (default: 2 minutes).