infra/.forgejo/workflows/build-apcupsd-exporter.yaml
Finn 4c09b127c3
All checks were successful
/ build (push) Successful in 38s
upload SHA256SUMS file
2024-08-04 23:45:21 -07:00

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