Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have GHA build the binaries #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kquinsland
Copy link

I am trying to run this exporter on a tiny raspberry pi zero with 512meg ram and a tiny microSD card to boot.
I was not looking forward to a long wait with apt get install golang ... (~350 MB!) just to build the binary.

This GHA workflow will automatically build binaries when a new release is created. I have tested this on my own repo and I was able to pull the binary and run it.

root@raspberrypi:/opt# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
root@raspberrypi:/opt# uname -a
Linux raspberrypi 5.15.32+ #1538 Thu Mar 31 19:37:58 BST 2022 armv6l GNU/Linux
root@raspberrypi:/opt# wget https://github.com/kquinsland/apcupsd_exporter/releases/download/v0.3.1/apcupsd_exporter-v0.3.1-linux-arm.tar.gz  
--2022-07-01 02:55:25--  https://github.com/kquinsland/apcupsd_exporter/releases/download/v0.3.1/apcupsd_exporter-v0.3.1-linux-arm.tar.gz  
Resolving github.com (github.com)... 192.30.255.112  
<...>  
2022-07-01 02:55:27 (3.74 MB/s) - ‘apcupsd_exporter-v0.3.1-linux-arm.tar.gz’ saved [5347842/5347842]  
  
root@raspberrypi:/opt# tar -xzvf apcupsd_exporter-v0.3.1-linux-arm.tar.gz     
apcupsd_exporter  
root@raspberrypi:/opt# chmod +x apcupsd_exporter    
root@raspberrypi:/opt# ./apcupsd_exporter    
2022/07/01 02:55:56 starting apcupsd exporter on ":9162" for server tcp://:3551 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant