ci: simplify workflow to work without Node.js dependencies
- Remove complex workflows that required GitHub Actions - Add simple build-images.yml using pure shell commands - No external action dependencies (checkout, buildx, build-push-action) - Direct docker build and push commands - Works with act_runner without Node.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
bb0cd077ab
commit
eb0748f597
32
.gitea/workflows/README.md
Normal file
32
.gitea/workflows/README.md
Normal file
@ -0,0 +1,32 @@
|
||||
Criei o serviço systemd conforme a documentação oficial do Gitea! Agora execute estes comandos:
|
||||
|
||||
# 1. Copiar o arquivo de serviço para o systemd
|
||||
sudo cp /tmp/act_runner.service /etc/systemd/system/
|
||||
|
||||
# 2. Recarregar o systemd
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
# 3. Habilitar o serviço para iniciar no boot
|
||||
sudo systemctl enable act_runner
|
||||
|
||||
# 4. Iniciar o serviço agora
|
||||
sudo systemctl start act_runner
|
||||
|
||||
Depois disso, você poderá usar os comandos oficiais:
|
||||
|
||||
# Iniciar o runner
|
||||
sudo systemctl start act_runner
|
||||
|
||||
# Parar o runner
|
||||
sudo systemctl stop act_runner
|
||||
|
||||
# Ver status
|
||||
sudo systemctl status act_runner
|
||||
|
||||
# Ver logs em tempo real
|
||||
sudo journalctl -u act_runner -f
|
||||
|
||||
# Reiniciar
|
||||
sudo systemctl restart act_runner
|
||||
|
||||
Execute os comandos acima e me avise quando terminar para eu verificar se está funcionando!
|
||||
84
.gitea/workflows/build-images.yml
Normal file
84
.gitea/workflows/build-images.yml
Normal file
@ -0,0 +1,84 @@
|
||||
name: Build Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: git.automatizase.com.br
|
||||
REGISTRY_PATH: luis.erlacher/archon
|
||||
|
||||
jobs:
|
||||
build-server:
|
||||
runs-on: wsl
|
||||
steps:
|
||||
- name: Build archon-server
|
||||
run: |
|
||||
cd python
|
||||
docker build -f Dockerfile.server \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/server:latest \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/server:build-${{ github.run_number }} \
|
||||
.
|
||||
echo "✅ Server image built successfully"
|
||||
|
||||
- name: Push server image
|
||||
run: |
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/server:latest
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/server:build-${{ github.run_number }}
|
||||
echo "✅ Server image pushed to registry"
|
||||
|
||||
build-mcp:
|
||||
runs-on: wsl
|
||||
steps:
|
||||
- name: Build archon-mcp
|
||||
run: |
|
||||
cd python
|
||||
docker build -f Dockerfile.mcp \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/mcp:latest \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/mcp:build-${{ github.run_number }} \
|
||||
.
|
||||
echo "✅ MCP image built successfully"
|
||||
|
||||
- name: Push mcp image
|
||||
run: |
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/mcp:latest
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/mcp:build-${{ github.run_number }}
|
||||
echo "✅ MCP image pushed to registry"
|
||||
|
||||
build-frontend:
|
||||
runs-on: wsl
|
||||
steps:
|
||||
- name: Build archon-frontend
|
||||
run: |
|
||||
cd archon-ui-main
|
||||
docker build -f Dockerfile \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/frontend:latest \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/frontend:build-${{ github.run_number }} \
|
||||
.
|
||||
echo "✅ Frontend image built successfully"
|
||||
|
||||
- name: Push frontend image
|
||||
run: |
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/frontend:latest
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/frontend:build-${{ github.run_number }}
|
||||
echo "✅ Frontend image pushed to registry"
|
||||
|
||||
build-agents:
|
||||
runs-on: wsl
|
||||
steps:
|
||||
- name: Build archon-agents
|
||||
run: |
|
||||
cd python
|
||||
docker build -f Dockerfile.agents \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/agents:latest \
|
||||
-t ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/agents:build-${{ github.run_number }} \
|
||||
.
|
||||
echo "✅ Agents image built successfully"
|
||||
|
||||
- name: Push agents image
|
||||
run: |
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/agents:latest
|
||||
docker push ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/agents:build-${{ github.run_number }}
|
||||
echo "✅ Agents image pushed to registry"
|
||||
@ -1,123 +0,0 @@
|
||||
name: Build and Push Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: git.automatizase.com.br
|
||||
REGISTRY_PATH: luis.erlacher/archon
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: wsl
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: server
|
||||
context: ./python
|
||||
dockerfile: ./python/Dockerfile.server
|
||||
- name: mcp
|
||||
context: ./python
|
||||
dockerfile: ./python/Dockerfile.mcp
|
||||
- name: frontend
|
||||
context: ./archon-ui-main
|
||||
dockerfile: ./archon-ui-main/Dockerfile
|
||||
- name: agents
|
||||
context: ./python
|
||||
dockerfile: ./python/Dockerfile.agents
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
run: |
|
||||
echo "${{ secrets.GITEA_TOKEN }}" | docker login ${{ env.REGISTRY }} -u ${{ secrets.GITEA_USERNAME }} --password-stdin
|
||||
|
||||
- name: Extract version metadata
|
||||
id: meta
|
||||
run: |
|
||||
# Se for uma tag, usa a tag como versão
|
||||
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
else
|
||||
# Senão, gera versão baseada no número do run
|
||||
VERSION="v1.0.${{ github.run_number }}"
|
||||
fi
|
||||
|
||||
COMMIT_SHA="${{ github.sha }}"
|
||||
SHORT_SHA=${COMMIT_SHA:0:7}
|
||||
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push ${{ matrix.name }} image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ${{ matrix.context }}
|
||||
file: ${{ matrix.dockerfile }}
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ matrix.name }}:latest
|
||||
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ matrix.name }}:${{ steps.meta.outputs.version }}
|
||||
${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ matrix.name }}:${{ steps.meta.outputs.short_sha }}
|
||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ matrix.name }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ matrix.name }}:buildcache,mode=max
|
||||
|
||||
summary:
|
||||
needs: build-and-push
|
||||
runs-on: wsl
|
||||
|
||||
steps:
|
||||
- name: Extract version metadata
|
||||
id: meta
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/}
|
||||
else
|
||||
VERSION="v1.0.${{ github.run_number }}"
|
||||
fi
|
||||
COMMIT_SHA="${{ github.sha }}"
|
||||
SHORT_SHA=${COMMIT_SHA:0:7}
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "short_sha=${SHORT_SHA}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build Summary
|
||||
run: |
|
||||
echo "### 🚀 Docker Images Build & Push Summary" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Version:** \`${{ steps.meta.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Commit:** \`${{ steps.meta.outputs.short_sha }}\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Registry:** \`${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}\`" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "#### 📦 Images Pushed:" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Service | Image | Tags |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "|---------|-------|------|" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Server | \`${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/server\` | \`latest\`, \`${{ steps.meta.outputs.version }}\`, \`${{ steps.meta.outputs.short_sha }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| MCP | \`${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/mcp\` | \`latest\`, \`${{ steps.meta.outputs.version }}\`, \`${{ steps.meta.outputs.short_sha }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Frontend | \`${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/frontend\` | \`latest\`, \`${{ steps.meta.outputs.version }}\`, \`${{ steps.meta.outputs.short_sha }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Agents | \`${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/agents\` | \`latest\`, \`${{ steps.meta.outputs.version }}\`, \`${{ steps.meta.outputs.short_sha }}\` |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "#### 🔧 Docker Compose Usage:" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`yaml" >> $GITHUB_STEP_SUMMARY
|
||||
echo "services:" >> $GITHUB_STEP_SUMMARY
|
||||
echo " archon-server:" >> $GITHUB_STEP_SUMMARY
|
||||
echo " image: ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/server:${{ steps.meta.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo " archon-mcp:" >> $GITHUB_STEP_SUMMARY
|
||||
echo " image: ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/mcp:${{ steps.meta.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo " archon-frontend:" >> $GITHUB_STEP_SUMMARY
|
||||
echo " image: ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/frontend:${{ steps.meta.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo " archon-agents:" >> $GITHUB_STEP_SUMMARY
|
||||
echo " image: ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/agents:${{ steps.meta.outputs.version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
|
||||
@ -1,22 +0,0 @@
|
||||
name: Test Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: wsl
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build archon-server image
|
||||
run: |
|
||||
cd python
|
||||
docker build -f Dockerfile.server -t archon-server:test .
|
||||
|
||||
- name: Show Docker images
|
||||
run: docker images | grep archon
|
||||
Loading…
Reference in New Issue
Block a user