usepod-agent 0.3.4

Use Pod marketplace provider agent — connects local inference backends (vLLM, llama.cpp, LM Studio, Ollama) to the Use Pod coordinator and earns USDC for served jobs.
Documentation
# Build the provider-agent container image and push to Docker Hub.
#
# Trigger: same tag pattern as release.yml (`v*`).
# Output:  `usepod/provider-agent:<version>` + `:latest` (multi-arch:
#          linux/amd64, linux/arm64) on Docker Hub.
#
# Requires repo secrets:
#   DOCKERHUB_USERNAME
#   DOCKERHUB_TOKEN

name: release-docker

on:
  push:
    tags:
      - 'v*'

permissions:
  contents: read

jobs:
  docker:
    name: Build & push usepod/provider-agent
    runs-on: ubuntu-24.04
    # Skip silently when Docker Hub credentials aren't configured — the
    # GitHub Releases binaries cover the common install path, so the
    # container image is a nice-to-have, not a release blocker.
    env:
      DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
      DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
    steps:
      - name: Skip if Docker Hub creds missing
        if: ${{ env.DOCKERHUB_USERNAME == '' || env.DOCKERHUB_TOKEN == '' }}
        run: |
          echo "DOCKERHUB_USERNAME / DOCKERHUB_TOKEN not set; skipping image push."
          echo "JOB_SKIP=1" >> "$GITHUB_ENV"
      - name: Resolve version
        if: env.JOB_SKIP != '1'
        id: v
        run: |
          ver="${GITHUB_REF#refs/tags/}"
          bare="${ver#v}"
          echo "version=$ver"   >> "$GITHUB_OUTPUT"
          echo "bare=$bare"     >> "$GITHUB_OUTPUT"

      - name: Checkout
        if: env.JOB_SKIP != '1'
        uses: actions/checkout@v6.0.2

      - name: Set up QEMU
        if: env.JOB_SKIP != '1'
        uses: docker/setup-qemu-action@v4.0.0

      - name: Set up Buildx
        if: env.JOB_SKIP != '1'
        uses: docker/setup-buildx-action@v4.0.0

      - name: Log in to Docker Hub
        if: env.JOB_SKIP != '1'
        uses: docker/login-action@v4.1.0
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Compute image tags + labels
        if: env.JOB_SKIP != '1'
        id: meta
        uses: docker/metadata-action@v6.0.0
        with:
          images: usepod/provider-agent
          tags: |
            type=raw,value=${{ steps.v.outputs.bare }}
            type=raw,value=latest
            type=sha,format=short

      - name: Build and push
        if: env.JOB_SKIP != '1'
        uses: docker/build-push-action@v7.1.0
        with:
          context: .
          file: Dockerfile
          platforms: linux/amd64,linux/arm64
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          provenance: true
          sbom: true
          cache-from: type=gha
          cache-to: type=gha,mode=max