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

32 lines
916 B
YAML
Raw Normal View History

2024-08-05 06:05:21 +00:00
on:
push:
branches:
- main
2024-08-05 06:32:09 +00:00
- apcupsd-exporter
2024-08-05 06:32:46 +00:00
# paths:
# - .forgejo/workflows/build-apcupsd-exporter.yaml
2024-08-05 06:05:21 +00:00
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
go build .
2024-08-05 06:32:09 +00:00
ls -lha apcupsd_exporter
pwd
2024-08-05 06:05:21 +00:00
- 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
2024-08-05 06:32:09 +00:00
package: infra/apcupsd_exporter
2024-08-05 06:05:21 +00:00