From 65e0d387bac5512a0f331a39e2adb57c809163a9 Mon Sep 17 00:00:00 2001 From: Finn Date: Mon, 5 Aug 2024 00:10:34 -0700 Subject: [PATCH] Add smartctl_exporter build --- .../workflows/build-smartctl-exporter.yaml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .forgejo/workflows/build-smartctl-exporter.yaml diff --git a/.forgejo/workflows/build-smartctl-exporter.yaml b/.forgejo/workflows/build-smartctl-exporter.yaml new file mode 100644 index 0000000..ccb247e --- /dev/null +++ b/.forgejo/workflows/build-smartctl-exporter.yaml @@ -0,0 +1,33 @@ +on: + push: + branches: + - main + paths: + - .forgejo/workflows/build-smartctl-exporter.yaml + +jobs: + build: + runs-on: docker + container: + image: ghcr.io/catthehacker/ubuntu:runner-latest + steps: + - name: Build smartctl_exporter + run: | + set -ex + sudo apt-get update && sudo apt-get install -y golang-go + git clone https://github.com/prometheus-community/smartctl_exporter + cd smartctl_exporter + git checkout v0.12.0 + go build . + sha256sum smartctl_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: | + smartctl_exporter/smartctl_exporter + smartctl_exporter/SHA256SUMS.txt + version: ${{ github.SHA }} + package: infra-smartctl-exporter +