Skip to content

Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.2 #585

Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.2

Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.2 #585

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.x
- run: make lint
if: ${{ matrix.platform == 'ubuntu-latest' }}
- run: make test
release:
runs-on: ubuntu-latest
if: contains(github.ref, 'refs/tags/')
needs: test
outputs:
upload_url: ${{ steps.release.outputs.upload_url }}
steps:
- name: Create GitHub release
uses: actions/create-release@v1
id: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: TODO
draft: true
assets:
strategy:
matrix:
target:
- { name: linux-amd64, runner: ubuntu-latest, goos: linux, goarch: amd64 }
- { name: windows-amd64,runner: windows-latest,goos: windows, goarch: amd64 }
- { name: linux-arm64, runner: ubuntu-latest, goos: linux, goarch: arm64 }
runs-on: ${{ matrix.target.runner }}
needs: release
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.x
- name: Set App Version
run: echo "APP_VERSION=$(git describe --tags --abbrev=0 | sed -e 's/^v//')" >> $GITHUB_ENV
shell: bash
- name: Set Go Environment for Target
env:
TARGET_GOOS: ${{ matrix.target.goos }}
TARGET_GOARCH: ${{ matrix.target.goarch }}
run: |
echo "GOOS=${TARGET_GOOS}" >> $GITHUB_ENV
echo "GOARCH=${TARGET_GOARCH}" >> $GITHUB_ENV
shell: bash
- name: Set Asset Name
run: echo "ASSET_NAME=fastly-exporter-${{ env.APP_VERSION }}.$(go env GOOS)-$(go env GOARCH).tar.gz" >> $GITHUB_ENV
shell: bash
- name: Set Asset Path
run: echo "ASSET_PATH=dist/v${{ env.APP_VERSION }}/${{ env.ASSET_NAME }}" >> $GITHUB_ENV
shell: bash
- name: Build distributable
run: make dist # This will use GOOS/GOARCH from the environment
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: ${{ env.ASSET_PATH }}
asset_name: ${{ env.ASSET_NAME }}
asset_content_type: application/gzip
docker-dry-run:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set App Version
run: echo "APP_VERSION=$(git describe --tags --abbrev=0 | sed -e 's/^v//')" >> $GITHUB_ENV
shell: bash
- name: Set Branch
run: echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
shell: bash
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker auth
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Add Docker metadata
uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/fastly/fastly-exporter
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{version}}
- name: Docker build
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: false # This indicates a dry run
tags: ${{ steps.meta.outputs.tags }}
build-args: |
VERSION=${{ env.APP_VERISON }}
BRANCH=${{ env.BRANCH }}
docker-release:
runs-on: ubuntu-latest
needs: release
permissions:
contents: read
packages: write
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set App Version
run: echo "APP_VERSION=$(git describe --tags --abbrev=0 | sed -e 's/^v//')" >> $GITHUB_ENV
shell: bash
- name: Set Branch
run: echo "BRANCH=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
shell: bash
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker auth
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Add Docker metadata
uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/fastly/fastly-exporter
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{major}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{version}}
- name: Docker build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
VERSION=${{ env.APP_VERISON }}
BRANCH=${{ env.BRANCH }}