Skip to content

build(deps): bump the all-npm group across 1 directory with 9 updates #365

build(deps): bump the all-npm group across 1 directory with 9 updates

build(deps): bump the all-npm group across 1 directory with 9 updates #365

Workflow file for this run

name: Agent Image
on:
workflow_dispatch:
push:
branches: [main, master]
paths:
- "services/agent/**"
- "packages/**"
- ".github/workflows/agent.yaml"
pull_request:
branches: [main, master]
paths:
- "services/agent/**"
- "packages/**"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/netclode-agent
jobs:
test-and-build:
name: Test & Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
# --- Test ---
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: "npm"
cache-dependency-path: services/agent/package-lock.json
- name: Install dependencies
run: npm ci
working-directory: services/agent
- name: Run tests
run: npm test
working-directory: services/agent
- name: Type check
run: npm run typecheck
working-directory: services/agent
# --- 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
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: services/agent/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