Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/mainloop-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Mainloop fork: build the stock Dockerfile (slim, linux/amd64 — the k8s TEST nodes are amd64) and push it to
# ghcr.io/mainloop-ai/hermes-agent:sha-<commit>. The deployment (mainloop-k8s-platform apps/hermes-agent) pins the digest.
# Upstream's own workflows are disabled in this fork; this is the only one that runs.
name: mainloop-image

on:
workflow_dispatch:
push:
branches: [main]

permissions:
contents: read
packages: write

concurrency:
group: mainloop-image
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-24.04
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Write install stamp
run: |
python3 scripts/write_install_stamp.py --output install-stamp.json \
--distribution docker --update-mechanism external --source ci --commit "$GITHUB_SHA"

- name: Free disk space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: build
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64
push: true
build-args: |
HERMES_BOT_DESKTOP=0
tags: |
ghcr.io/mainloop-ai/hermes-agent:sha-${{ github.sha }}
ghcr.io/mainloop-ai/hermes-agent:main
cache-from: type=gha,scope=mainloop-amd64
cache-to: type=gha,mode=max,scope=mainloop-amd64

- name: Summary
run: |
echo "image: ghcr.io/mainloop-ai/hermes-agent:sha-${GITHUB_SHA}" >> "$GITHUB_STEP_SUMMARY"
echo "digest: ${{ steps.build.outputs.digest }}" >> "$GITHUB_STEP_SUMMARY"
Loading