infra/.forgejo/workflows/build-apcupsd-exporter.yaml

31 lines
860 B
YAML
Raw Normal View History

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:
2024-08-05 06:20:47 +00:00
- uses: actions/setup-go@v5
2024-08-05 06:24:42 +00:00
with:
2024-08-05 06:25:45 +00:00
go-version: 1.22
2024-08-05 06:05:21 +00:00
- name: Build apcupsd_exporter
run: |
set -exuo pipefail
git clone https://github.com/mdlayher/apcupsd_exporter.git
cd apcupsd_exporter
go build .
- 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
package: infra-apcupsd_exporter