32 lines
1,013 B
YAML
32 lines
1,013 B
YAML
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: |
|
|
set -ex
|
|
sudo apt-get update && sudo apt-get install -y golang-go
|
|
git clone https://github.com/mdlayher/apcupsd_exporter.git
|
|
cd apcupsd_exporter
|
|
go build ./cmd/apcupsd_exporter
|
|
sha256sum apcupsd_exporter | tee SHA256SUMS.txt
|
|
- name: upload
|
|
uses: https://codeberg.org/EntanglementGarden/actions/generic-upload@v0.1
|
|
with:
|
|
upload-username: ${{ secrets.DEPLOY_USER }} # must be a user that can upload to the registry
|
|
upload-token: ${{ secrets.DEPLOY_TOKEN }}
|
|
files: |
|
|
apcupsd_exporter/apcupsd_exporter
|
|
apcupsd_exporter/SHA256SUMS.txt
|
|
version: ${{ github.SHA }}
|
|
package: infra-apcupsd_exporter
|
|
|