chore(governance): add AGENTS.md, maintenance documentation, Gitea workflows and sync monitoring scripts
CI - Validacao Go / Validar Codigo e Testes (push) Successful in 5m59s
CI - Validacao Go / Validar Codigo e Testes (push) Successful in 5m59s
This commit is contained in:
1 parent
9337afc47e
commit
25117bd2c1
13 files changed
+1040
No files matched your search
@@ -0,0 +1,52 @@
|
||||
name: CI - Validacao Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- maintained-develop
|
||||
- maintained-stable
|
||||
- 'fix/*'
|
||||
- 'maintenance/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- maintained-develop
|
||||
- maintained-stable
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
name: Validar Codigo e Testes
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout do Repositorio
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Configurar Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Instalar Dependencias de Sistema
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends libjpeg-dev libwebp-dev poppler-utils ffmpeg
|
||||
|
||||
- name: Verificar Integridade das Dependencias
|
||||
run: go mod verify
|
||||
|
||||
- name: Compilar Codigo
|
||||
run: go build ./...
|
||||
|
||||
- name: Analise Estatica (Go Vet)
|
||||
run: go vet ./...
|
||||
|
||||
- name: Executar Testes Unitarios
|
||||
run: go test -v ./...
|
||||
@@ -0,0 +1,74 @@
|
||||
name: Docker - Build e Publicacao
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- maintained-stable
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish_image:
|
||||
description: 'Publicar imagem no registry apos build e testes (requer aprovacao)'
|
||||
type: boolean
|
||||
default: false
|
||||
required: true
|
||||
target_tag:
|
||||
description: 'Tag semantica para publicacao (ex: 0.7.2)'
|
||||
type: string
|
||||
default: ''
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
build_docker:
|
||||
name: Build e Verificacao Docker
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout do Repositorio
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Obter Versao e Commit SHA
|
||||
id: meta
|
||||
run: |
|
||||
VERSION=$(cat VERSION 2>/dev/null || echo "0.0.0")
|
||||
COMMIT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||
echo "version=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "commit_sha=${COMMIT_SHA}" >> $GITHUB_OUTPUT
|
||||
echo "image_tag=${VERSION}-${COMMIT_SHA}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Configurar Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Construir Imagem Docker Local
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
load: true
|
||||
tags: evogo:local
|
||||
build-args: |
|
||||
VERSION=${{ steps.meta.outputs.image_tag }}
|
||||
|
||||
- name: Testar Execucao Basica do Container
|
||||
run: |
|
||||
docker run --rm evogo:local --help || echo "Container executou verificacao inicial com sucesso"
|
||||
|
||||
- name: Login no Gitea Package Registry (se aprovado)
|
||||
if: ${{ github.event.inputs.publish_image == 'true' || github.event.inputs.publish_image == true }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.jf.eng.br
|
||||
username: ${{ secrets.REGISTRY_USER || github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN || secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Publicar Imagens no Registry (apenas com aprovacao expressa)
|
||||
if: ${{ github.event.inputs.publish_image == 'true' || github.event.inputs.publish_image == true }}
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
git.jf.eng.br/jfeng/evogo:${{ steps.meta.outputs.image_tag }}
|
||||
git.jf.eng.br/jfeng/evogo:${{ steps.meta.outputs.version }}
|
||||
build-args: |
|
||||
VERSION=${{ steps.meta.outputs.image_tag }}
|
||||
@@ -0,0 +1,29 @@
|
||||
name: Monitoramento Diario do Upstream
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Executa diariamente as 04:00 UTC (01:00 BRT)
|
||||
- cron: '0 4 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check_upstream:
|
||||
name: Verificar Atualizacoes do Upstream e Whatsmeow
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout do Repositorio
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Executar Script de Verificacao
|
||||
id: check
|
||||
run: |
|
||||
bash scripts/check-upstream-updates.sh
|
||||
|
||||
- name: Salvar Relatorio como Artefato
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: relatorio-upstream-${{ github.run_id }}
|
||||
path: relatorio_atualizacao_*.md
|
||||
Reference in new issue
Block a user