Skip to content

fix: same autoip_interface empty string check for controller config #88

fix: same autoip_interface empty string check for controller config

fix: same autoip_interface empty string check for controller config #88

Workflow file for this run

name: Build
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: linux
goarch: arm
goarm: "7"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
CGO_ENABLED: "0"
run: |
suffix="${{ matrix.goarch }}"
[ -n "${{ matrix.goarm }}" ] && suffix="${suffix}v${{ matrix.goarm }}"
version="${GITHUB_REF_NAME:-dev}"
go build -trimpath -ldflags="-s -w -X main.Version=${version}" -o "vxlan-controller-${suffix}" ./cmd/vxlan-controller
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vxlan-controller-${{ matrix.goarch }}${{ matrix.goarm && format('v{0}', matrix.goarm) || '' }}
path: vxlan-controller-*
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Vet
run: go vet ./...
release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build, vet]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Prepare release assets
run: |
mkdir -p release
for dir in artifacts/vxlan-controller-*/; do
cp "$dir"vxlan-controller-* release/
done
cd release && sha256sum vxlan-controller-* > checksums.txt
- name: Create or update release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
make_latest: true
files: release/*