2024-08-05 06:05:21 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- .forgejo/workflows/build-apcupsd-exporter.yaml
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
|
|
|
steps:
|
|
|
|
- name: Build apcupsd_exporter
|
|
|
|
run: |
|
2024-08-05 06:28:01 +00:00
|
|
|
set -ex
|
2024-08-05 06:27:25 +00:00
|
|
|
sudo apt-get update && sudo apt-get install -y golang-go
|
2024-08-05 06:05:21 +00:00
|
|
|
git clone https://github.com/mdlayher/apcupsd_exporter.git
|
|
|
|
cd apcupsd_exporter
|
2024-08-05 06:32:09 +00:00
|
|
|
go build ./cmd/apcupsd_exporter
|
2024-08-05 06:42:23 +00:00
|
|
|
sha256sum apcupsd_exporter | tee SHA256SUMS.txt
|
2024-08-05 06:05:21 +00:00
|
|
|
- name: upload
|
2024-09-08 05:03:08 +00:00
|
|
|
uses: https://codeberg.org/EntanglementGarden/actions/generic-upload@v0.2
|
2024-08-05 06:05:21 +00:00
|
|
|
with:
|
|
|
|
upload-username: ${{ secrets.DEPLOY_USER }} # must be a user that can upload to the registry
|
|
|
|
upload-token: ${{ secrets.DEPLOY_TOKEN }}
|
2024-08-05 06:42:23 +00:00
|
|
|
files: |
|
|
|
|
apcupsd_exporter/apcupsd_exporter
|
2024-08-05 06:45:21 +00:00
|
|
|
apcupsd_exporter/SHA256SUMS.txt
|
2024-08-05 06:32:09 +00:00
|
|
|
version: ${{ github.SHA }}
|
2024-08-05 06:05:21 +00:00
|
|
|
package: infra-apcupsd_exporter
|
|
|
|
|