Skip to content

build(deps): bump the all-go group across 1 directory with 12 updates #329

build(deps): bump the all-go group across 1 directory with 12 updates

build(deps): bump the all-go group across 1 directory with 12 updates #329

Workflow file for this run

name: Control Plane Image
on:
workflow_dispatch:
push:
branches: [main, master]
paths:
- "services/control-plane/**"
- ".github/workflows/control-plane.yaml"
pull_request:
branches: [main, master]
paths:
- "services/control-plane/**"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/netclode-control-plane
jobs:
test-and-build:
name: Test & Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v6
# --- Test ---
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: services/control-plane/go.mod
cache-dependency-path: services/control-plane/go.sum
- name: Run tests
working-directory: services/control-plane
run: |
go install gotest.tools/gotestsum@v1.13.0
gotestsum --junitfile test-results.xml -- ./...
- name: Upload test results to Datadog
if: always() && env.DD_API_KEY != ''
working-directory: services/control-plane
run: |
npx @datadog/datadog-ci@2.48 junit upload --service control-plane test-results.xml
env:
DATADOG_SITE: datadoghq.com
# --- Build ---
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: services/control-plane
file: services/control-plane/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max