22d9f5b21d
Novas skills instaladas: - openclaw-agent-browser v1.0.0 CLI Chromium — navegação, login, screenshots, state - skill-security-audit v1.0.0 SAST scanning, prompt injection, secrets audit - sql-toolkit v1.0.0 PostgreSQL/MySQL/SQLite — schema, query, otimização - file v1.0.0 Organização de arquivos por contexto - file-summary v1.0.0 Extração e resumo de PDFs, Word, Excel Workspace expandido: - TOOLS.md: +Browser automation, Security audit, SQL, File management - AGENTS.md: +Linux Analyst section (comandos, logs, rede, scripts) + Full-stack strategy - MEMORY.md: 16 skills indexadas, stack map, comandos Linux ref - SESSION-STATE.md: atualizado com contexto completo - lock.json: sincronizado com 16 skills instaladas
82 lines
2.5 KiB
YAML
82 lines
2.5 KiB
YAML
name: Build & Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }} # e.g. owner/repo → ghcr.io/owner/repo
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
tags: |
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
type=sha,prefix=sha-
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
# Optional: trigger xCloud to pull & redeploy
|
|
# Add XCLOUD_DEPLOY_WEBHOOK to GitHub repo secrets
|
|
- name: Trigger xCloud deploy
|
|
if: ${{ secrets.XCLOUD_DEPLOY_WEBHOOK != '' }}
|
|
run: |
|
|
curl -s -X POST "${{ secrets.XCLOUD_DEPLOY_WEBHOOK }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"ref": "${{ github.sha }}"}'
|
|
|
|
# ─────────────────────────────────────────────
|
|
# Multi-service variant (uncomment if needed)
|
|
# ─────────────────────────────────────────────
|
|
# jobs:
|
|
# build-and-push:
|
|
# strategy:
|
|
# matrix:
|
|
# include:
|
|
# - service: app
|
|
# dockerfile: Dockerfile
|
|
# image_suffix: app
|
|
# - service: worker
|
|
# dockerfile: Dockerfile.worker
|
|
# image_suffix: worker
|
|
# steps:
|
|
# - name: Build and push
|
|
# uses: docker/build-push-action@v5
|
|
# with:
|
|
# context: .
|
|
# file: ${{ matrix.dockerfile }}
|
|
# tags: ghcr.io/${{ github.repository }}-${{ matrix.image_suffix }}:latest
|