Repository navigation
Build Hermes Agent Image 2026.9.24 #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Hermes Agent Image | |
| run-name: Build Hermes Agent Image ${{ github.event.inputs.hermesAgentTag }} | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| hermesAgentTag: | |
| description: "Hermes Agent release tag" | |
| default: "2026.9.24" | |
| required: true | |
| platforms: | |
| description: "Platforms" | |
| default: "linux/amd64,linux/arm64/v8" | |
| required: true | |
| pushLatest: | |
| description: "Push latest tag" | |
| default: "true" | |
| required: true | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Resolve Base Image | |
| id: resolve | |
| env: | |
| HERMES_AGENT_TAG: ${{ github.event.inputs.hermesAgentTag }} | |
| run: | | |
| set -euo pipefail | |
| raw_tag="${HERMES_AGENT_TAG#v}" | |
| candidates=( | |
| "nousresearch/hermes-agent:v${raw_tag}" | |
| "nousresearch/hermes-agent:${raw_tag}" | |
| ) | |
| for image in "${candidates[@]}"; do | |
| if docker buildx imagetools inspect "${image}" >/dev/null 2>&1; then | |
| echo "base_image=${image}" >> "${GITHUB_OUTPUT}" | |
| echo "image_tag=${raw_tag}" >> "${GITHUB_OUTPUT}" | |
| echo "resolved_base_tag=${image##*:}" >> "${GITHUB_OUTPUT}" | |
| exit 0 | |
| fi | |
| done | |
| echo "::error::Requested Hermes Agent image not found: ${candidates[*]}" >&2 | |
| exit 1 | |
| - name: Build Hermes Agent Image and Push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: hermes-agent/Dockerfile | |
| platforms: ${{ github.event.inputs.platforms }} | |
| push: true | |
| build-args: | | |
| BASE_IMAGE=${{ steps.resolve.outputs.base_image }} | |
| tags: | | |
| 1panel/hermes-agent:${{ steps.resolve.outputs.image_tag }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Push Latest Tag | |
| if: ${{ github.event.inputs.pushLatest == 'true' }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: hermes-agent/Dockerfile | |
| platforms: ${{ github.event.inputs.platforms }} | |
| push: true | |
| build-args: | | |
| BASE_IMAGE=${{ steps.resolve.outputs.base_image }} | |
| tags: | | |
| 1panel/hermes-agent:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |