Files
gitops-automation/.gitea/workflows/build.yml
T
william 5f804baea9
build-agent / build-and-push (push) Failing after 2s
Grant packages:write to the build job's auto-token
2026-08-23 11:03:42 +00:00

31 lines
859 B
YAML

name: build-agent
on:
push:
branches: [main]
paths:
- "agent/**"
- ".gitea/workflows/build.yml"
workflow_dispatch: {}
jobs:
build-and-push:
runs-on: docker
# Default auto-token permission on this instance is read-only for packages;
# pushing to the container registry needs write explicitly.
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to Gitea registry
run: |
echo "${{ secrets.GITEA_TOKEN }}" | docker login "${{ vars.REGISTRY_HOST }}" \
-u "${{ gitea.actor }}" --password-stdin
- name: Build and push claude-agent image
run: |
IMAGE="${{ vars.REGISTRY_HOST }}/${{ gitea.repository }}/claude-agent:latest"
docker build -t "$IMAGE" ./agent
docker push "$IMAGE"