mirror of
https://github.com/kerberos-io/agent.git
synced 2026-11-23 23:10:50 +00:00
- JWT signing key: without AGENT_JWT_SECRET, generate a random secret on first start and keep it in data/config/jwt_secret (0600) instead of falling back to a publicly known constant. AGENT_JWT_SECRET still takes precedence, so deployments that share a key with Kerberos Factory are unchanged. - Only tokens for the configured account are authorised, and malformed token claims are rejected instead of panicking. - /ws (live view) and /file (recordings) now require a valid token. The UI passes it as ?token=, since browsers cannot set headers on WebSocket connections or <video src>; it no longer opens the socket before sign-in. /file no longer sends its own wildcard CORS header. - pprof is off by default; AGENT_ENABLE_PPROF=true registers it behind auth. - Release workflows pass tags to shell steps through quoted environment variables and validate them; the shared release-bump workflow is pinned to a commit and no longer receives inherited secrets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
171 lines
5.6 KiB
YAML
171 lines
5.6 KiB
YAML
name: Bump release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
bump:
|
|
description: "Which part of the version to bump"
|
|
required: true
|
|
default: patch
|
|
type: choice
|
|
options:
|
|
- major
|
|
- minor
|
|
- patch
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
env:
|
|
REPO: kerberos/agent
|
|
|
|
jobs:
|
|
# Determine the next version, create the GitHub release and expose the tag.
|
|
bump-release:
|
|
# Pinned to a reviewed commit of uug-ai/workflows so changes there cannot
|
|
# alter this release without a change here. It only needs GITHUB_TOKEN,
|
|
# which GitHub provides to called workflows, so no secrets are passed on.
|
|
uses: uug-ai/workflows/.github/workflows/release-bump.yml@6c1805abf25ac34add01d4af711277e8a68945ab # main as of 2026-11-20
|
|
with:
|
|
bump: ${{ github.event.inputs.bump }}
|
|
|
|
# Publish the platform image to the uug-ai GitHub Container Registry
|
|
# (ghcr.io/uug-ai/agent-platform).
|
|
#release:
|
|
# needs: bump-release
|
|
# uses: uug-ai/workflows/.github/workflows/release-create.yml@main
|
|
# with:
|
|
# organization: uug-ai
|
|
# project: ${{ github.event.repository.name }}
|
|
# tag: ${{ needs.bump-release.outputs.tag }}
|
|
# docker_context: "."
|
|
# create_gitops_pr: false
|
|
# runner_matrix: >-
|
|
# [
|
|
# {"architecture":"amd64","runner":"ubuntu-24.04"},
|
|
# {"architecture":"arm64","runner":"ubuntu-24.04-arm"}
|
|
# ]
|
|
# secrets: inherit
|
|
|
|
# Everything below mirrors the agent's own release-create.yml pipeline and
|
|
# publishes the multi-arch image to the kerberos/agent Docker Hub repo, driven
|
|
# by the freshly bumped tag instead of a `release: created` event.
|
|
build-amd64:
|
|
needs: bump-release
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
matrix:
|
|
architecture: [amd64]
|
|
env:
|
|
ARCH: ${{ matrix.architecture }}
|
|
RELEASE_TAG: ${{ needs.bump-release.outputs.tag }}
|
|
steps:
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Run Build
|
|
run: |
|
|
docker build --provenance=false --build-arg VERSION="${RELEASE_TAG}" -t "${ARCH}" .
|
|
CID=$(docker create "${ARCH}")
|
|
docker cp "${CID}:/home/agent" "./output-${ARCH}"
|
|
docker rm "${CID}"
|
|
- name: Strip binary
|
|
run: tar -cf "agent-${ARCH}.tar" -C "output-${ARCH}" . && rm -rf "output-${ARCH}"
|
|
- name: Build and push Docker image
|
|
run: |
|
|
docker tag "${ARCH}" "${REPO}-arch:arch-${ARCH}-${RELEASE_TAG}"
|
|
docker push "${REPO}-arch:arch-${ARCH}-${RELEASE_TAG}"
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: agent-${{matrix.architecture}}.tar
|
|
path: agent-${{matrix.architecture}}.tar
|
|
|
|
build-arm64:
|
|
needs: bump-release
|
|
runs-on: ubuntu-24.04-arm
|
|
permissions:
|
|
contents: write
|
|
strategy:
|
|
matrix:
|
|
architecture: [arm64]
|
|
env:
|
|
ARCH: ${{ matrix.architecture }}
|
|
RELEASE_TAG: ${{ needs.bump-release.outputs.tag }}
|
|
steps:
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Run Build
|
|
run: |
|
|
docker build --provenance=false --build-arg VERSION="${RELEASE_TAG}" -t "${ARCH}" .
|
|
CID=$(docker create "${ARCH}")
|
|
docker cp "${CID}:/home/agent" "./output-${ARCH}"
|
|
docker rm "${CID}"
|
|
- name: Strip binary
|
|
run: tar -cf "agent-${ARCH}.tar" -C "output-${ARCH}" . && rm -rf "output-${ARCH}"
|
|
- name: Build and push Docker image
|
|
run: |
|
|
docker tag "${ARCH}" "${REPO}-arch:arch-${ARCH}-${RELEASE_TAG}"
|
|
docker push "${REPO}-arch:arch-${ARCH}-${RELEASE_TAG}"
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: agent-${{matrix.architecture}}.tar
|
|
path: agent-${{matrix.architecture}}.tar
|
|
|
|
create-manifest:
|
|
runs-on: ubuntu-24.04
|
|
needs: [bump-release, build-amd64, build-arm64]
|
|
env:
|
|
RELEASE_TAG: ${{ needs.bump-release.outputs.tag }}
|
|
steps:
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
- name: Create and push multi-arch manifest
|
|
run: |
|
|
docker manifest create "${REPO}:${RELEASE_TAG}" \
|
|
"${REPO}-arch:arch-amd64-${RELEASE_TAG}" \
|
|
"${REPO}-arch:arch-arm64-${RELEASE_TAG}"
|
|
docker manifest push "${REPO}:${RELEASE_TAG}"
|
|
- name: Create and push latest manifest
|
|
run: |
|
|
docker manifest create "${REPO}:latest" \
|
|
"${REPO}-arch:arch-amd64-${RELEASE_TAG}" \
|
|
"${REPO}-arch:arch-arm64-${RELEASE_TAG}"
|
|
docker manifest push "${REPO}:latest"
|
|
|
|
create-release:
|
|
runs-on: ubuntu-24.04
|
|
needs: [bump-release, build-amd64, build-arm64]
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
- name: Create a release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
latest: true
|
|
allowUpdates: true
|
|
name: ${{ needs.bump-release.outputs.tag }}
|
|
tag: ${{ needs.bump-release.outputs.tag }}
|
|
generateReleaseNotes: false
|
|
omitBodyDuringUpdate: true
|
|
artifacts: "agent-*.tar/agent-*.tar"
|
|
|
|
|