Add agent reviewer build workflow
Some checks failed
build / build (push) Failing after 1s

This commit is contained in:
robert
2026-06-03 22:20:03 -03:00
parent 5ce474bb55
commit f75f73f29d

View File

@@ -0,0 +1,38 @@
name: build
on:
push:
branches: [main]
paths-ignore:
- 'deploy/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout from in-cluster gitea
run: |
set -e
git clone --depth=1 \
"http://gitea_admin:${{ secrets.ADMIN_PW }}@gitea-http.gitea.svc.cluster.local:3000/gitea_admin/agent-reviewer.git" .
git checkout "$GITHUB_SHA"
- name: build image
run: |
IMG=registry.a2acloud.io/agents/agent-reviewer
docker build --pull -t "$IMG:$GITHUB_SHA" -t "$IMG:latest" .
docker push "$IMG:$GITHUB_SHA"
docker push "$IMG:latest"
- name: bump deploy manifest
run: |
IMG=registry.a2acloud.io/agents/agent-reviewer
sed -i "s|image: $IMG:.*|image: $IMG:$GITHUB_SHA|" deploy/20-deployment.yaml
git config user.email "ci@a2a.local"
git config user.name "ci"
git add deploy/20-deployment.yaml
if git diff --staged --quiet; then
echo "no manifest changes"
else
git commit -m "ci: bump image to $GITHUB_SHA"
git push "http://gitea_admin:${{ secrets.ADMIN_PW }}@gitea-http.gitea.svc.cluster.local:3000/gitea_admin/agent-reviewer.git" HEAD:main
fi