Skip to content

Commit

Permalink
fix shell
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachard committed Nov 3, 2024
1 parent ba4d56a commit d557587
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: go build
name: Go Cross-Platform Build

on:
push:
Expand All @@ -18,8 +18,7 @@ permissions:
contents: read

jobs:

makefile:
makefile-build:
runs-on: ubuntu-latest

strategy:
Expand All @@ -29,8 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v4

# https://github.com/actions/setup-go/pull/460
- name: Configure env for toolchain ignore
- name: Configure environment to avoid toolchain installs
shell: bash
run: echo "GOTOOLCHAIN=local" >> "$GITHUB_ENV"

Expand All @@ -47,7 +45,7 @@ jobs:
- name: dep+build from makefile
run: make

go-build-all:
go-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -78,13 +76,16 @@ jobs:
- name: Build binary
run: |
if [[ "${{ matrix.os }}" == 'windows-latest' ]]; then
echo "Building for Windows"
set CGO_ENABLED=0
go build -ldflags="-s -w" -o go-dnscollector.exe .
else
echo "Building for ${matrix.os}"
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
fi
shell: bash

docker-build-all:
docker-build:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit d557587

Please sign in to comment.