From fa197f9cfcf36480787fa6415607c5d9f6021623 Mon Sep 17 00:00:00 2001 From: ireneazaceta <108934710+ireneazaceta@users.noreply.github.com> Date: Fri, 2 Aug 2024 14:14:03 +0200 Subject: [PATCH] Create go.yml --- .github/workflows/go.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..d9b2722 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,33 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "master" ] + pull_request: + branches: ["master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.11' + + - name: Install dependencies + run: | + go get . + + - name: Build for "System Temp" sensor + run: go build -ldflags="-X 'main.iPMI_TEMP_SENSOR=System Temp'" -o ipmitool_exporter ./main.go + + - name: Build for "Inlet Temp" sensor (ekhi) + run: go build -ldflags="-X 'main.iPMI_TEMP_SENSOR=Inlet Temp'" -o ipmitool_exporter-ekhi ./main.go