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

33 lines
954 B
YAML
Raw Normal View History

2024-08-05 06:05:21 +00:00
on:
push:
branches:
- main
2024-08-05 06:33:21 +00:00
- apcpupsd-exporter
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
2024-08-05 06:35:22 +00:00
go build ./cmd/apcupsd_exporter
2024-08-05 06:34:17 +00:00
ls -lha
2024-08-05 06:32:09 +00:00
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:38:06 +00:00
version: ${{ github.SHA }}
2024-08-05 06:32:09 +00:00
package: infra/apcupsd_exporter
2024-08-05 06:05:21 +00:00