Skip to content

feat: nixify

feat: nixify #7

Workflow file for this run

name: test
on: [pull_request]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: checkout source
uses: actions/checkout@v2
- name: build binary
run: |
sudo apt-get update
sudo apt-get install -y wget build-essential git
sudo apt-get upgrade -y
sudo wget https://golang.org/dl/go1.17.5.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.17.5.linux-amd64.tar.gz
export PATH="/usr/local/go/bin:$PATH"
go mod tidy
LDFLAGS='-s -w' make telegraf
if [ ! -f telegraf ]; then
echo "Failed to build binary"
exit 1
fi