Release / Plano (reaproveitar a imagem?) (push) Successful in 8s
CI / Trivy (dependências, segredos e configuração) (push) Failing after 8s
Release / ci (push) Failing after 9s
CI / Testes e imagem Docker (linux/arm64) (push) Skipped
Release / Publica a imagem (linux/arm64) (push) Skipped
Release / Cria a release no Gitea (push) Skipped
The GitHub account was suspended and the repository had no backup. The deployed code (src/, public/, index.html, main.py, requirements.txt) was extracted from the production image 1.3.1. The tests, Dockerfile, compose files, SECURITY.md, CHANGELOG.md and README were rebuilt from the records of the work sessions that created them; LICENSE, .gitignore, robots.txt and sitemap.xml were recreated. CI now runs on Gitea Actions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
1.2 KiB
Bash
Executable File
22 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Uso: scripts/plano-imagem.sh <registro> <repositório>
|
|
# Imprime inputs=, image= e reuse= (para $GITHUB_OUTPUT). O hash cobre só os
|
|
# arquivos que entram no build da imagem, não a documentação nem a configuração
|
|
# de ferramentas. reuse=true quando o registro já tem inputs-<hash>.
|
|
set -euo pipefail
|
|
registry=$1; ns=${2,,}
|
|
|
|
inputs=$(git ls-tree -r HEAD \
|
|
| awk -F' ' '$2 !~ /^(\.gitea|\.github|\.claude|\.wolf|docs)\// && $2 !~ /^(README.*|CHANGELOG\.md|SECURITY\.md|LICENSE|\.gitignore|\.gitattributes|docker-compose.*\.yaml|scripts\/release-notes\.sh)$/' \
|
|
| sha256sum | cut -c1-16)
|
|
token=$(curl -fsS "https://$registry/v2/token?service=container_registry&scope=repository:$ns:pull" | jq -r .token)
|
|
code=$(curl -s -o /dev/null -w '%{http_code}' -I \
|
|
-H "Authorization: Bearer $token" \
|
|
-H 'Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json,application/vnd.oci.image.manifest.v1+json' \
|
|
"https://$registry/v2/$ns/manifests/inputs-$inputs")
|
|
echo "inputs-$inputs -> HTTP $code" >&2
|
|
reuse=false; [ "$code" = 200 ] && reuse=true
|
|
echo "inputs=$inputs"
|
|
echo "image=$registry/$ns"
|
|
echo "reuse=$reuse"
|