Skip to content

Bump github.com/prometheus/prometheus from 0.54.1 to 0.55.0 #2138

Bump github.com/prometheus/prometheus from 0.54.1 to 0.55.0

Bump github.com/prometheus/prometheus from 0.54.1 to 0.55.0 #2138

Workflow file for this run

name: Go Cross-Platform Build
on:
push:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- main
permissions:
contents: read
jobs:
makefile-build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- uses: actions/checkout@v4
- name: Configure environment to avoid toolchain installs
shell: bash
run: echo "GOTOOLCHAIN=local" >> "$GITHUB_ENV"
- uses: actions/setup-go@v5
with:
go-version: "${{ matrix.go-version }}"
- name: build binary from makefile
run: make build
- name: dep from makefile
run: make dep
- name: dep+build from makefile
run: make
go-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ['1.21', '1.22', '1.23']
goos: [linux, freebsd, darwin, windows]
exclude:
- { os: macos-latest, goos: linux }
- { os: macos-latest, goos: freebsd }
- { os: macos-latest, goos: windows }
- { os: ubuntu-latest, goos: darwin }
- { os: ubuntu-latest, goos: windows }
- { os: windows-latest, goos: linux }
- { os: windows-latest, goos: freebsd }
- { os: windows-latest, goos: darwin }
steps:
- uses: actions/checkout@v4
- name: Configure environment to avoid toolchain installs
shell: bash
run: echo "GOTOOLCHAIN=local" >> "$GITHUB_ENV"
- uses: actions/setup-go@v5
with:
go-version: "${{ matrix.go-version }}"
- name: Build binary
run: |
if [[ "${{ matrix.os }}" == 'windows-latest' ]]; then
set CGO_ENABLED=0
go build -ldflags="-s -w" -o go-dnscollector.exe .
else
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=amd64 go build -ldflags="-s -w" -o go-dnscollector *.go
fi
shell: bash
docker-build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64, linux/386]
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
PLATFORM=${{ matrix.platform }}
TAG=$(echo "$PLATFORM" | tr '/' '-')
docker build --build-arg VERSION=dev . --platform $PLATFORM --file Dockerfile -t go-dnscollector:$TAG