Skip to content

chore(backend): reduce agent handler error log spam #3232

chore(backend): reduce agent handler error log spam

chore(backend): reduce agent handler error log spam #3232

Workflow file for this run

name: Build MCP
on:
push:
branches:
- 'main'
tags:
- '*'
pull_request:
jobs:
build-mcp:
runs-on: 'ubuntu-latest'
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version-file: 'go.mod'
check-latest: true
cache-dependency-path: |
go.sum
- name: Generate commit hash
id: hash
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build application
run: go build -ldflags="$LDFLAGS" -o dist/distr-mcp ./cmd/mcp/
env:
CGO_ENABLED: '0'
LDFLAGS: >-
-X github.com/distr-sh/distr/internal/buildconfig.version=${{ github.ref_name }}
-X github.com/distr-sh/distr/internal/buildconfig.commit=${{ steps.hash.outputs.sha_short }}
- name: Login to GitHub Container Registry (tag only)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Generate Docker Metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: ghcr.io/distr-sh/distr-mcp
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
labels: |
org.opencontainers.image.description=Distr MCP server
org.opencontainers.image.vendor=Glasskube
- name: Docker build (push on tag only)
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
id: build-push
with:
platforms: ${{ startsWith(github.ref, 'refs/tags/') && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
context: .
file: Dockerfile.mcp
push: ${{ startsWith(github.ref, 'refs/tags/') }}
sbom: true
provenance: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
if: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: Sign the images with GitHub OIDC Token
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
DIGEST: ${{ steps.build-push.outputs.digest }}
TAGS: ${{ steps.meta.outputs.tags }}
run: |
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}