ci: create a Gitea release when a v* tag is pushed
CI / Lint de idioma (R9) (push) Successful in 4s
CI / TypeScript (auth) (push) Successful in 3m4s
CI / TypeScript (storage) (push) Successful in 14s
CI / Go (protocols) (push) Successful in 4m21s
CI / Trivy (dependências, segredos e Dockerfiles) (push) Successful in 11s
CI / Imagem (auth) (push) Successful in 10s
CI / Testes (webmail) (push) Successful in 52s
CI / Imagem (migrations) (push) Successful in 5s
CI / Imagem (protocols) (push) Successful in 6s
CI / Imagem (rspamd) (push) Successful in 5s
CI / Imagem (storage) (push) Successful in 8s
CI / Imagem (webmail) (push) Successful in 8s
CI / Stack completa (push) Failing after 4s
CI / Lint de idioma (R9) (push) Successful in 4s
CI / TypeScript (auth) (push) Successful in 3m4s
CI / TypeScript (storage) (push) Successful in 14s
CI / Go (protocols) (push) Successful in 4m21s
CI / Trivy (dependências, segredos e Dockerfiles) (push) Successful in 11s
CI / Imagem (auth) (push) Successful in 10s
CI / Testes (webmail) (push) Successful in 52s
CI / Imagem (migrations) (push) Successful in 5s
CI / Imagem (protocols) (push) Successful in 6s
CI / Imagem (rspamd) (push) Successful in 5s
CI / Imagem (storage) (push) Successful in 8s
CI / Imagem (webmail) (push) Successful in 8s
CI / Stack completa (push) Failing after 4s
The Release workflow only ever published container images; there was no entry under Releases. The new job runs after every image is published and writes the image list and the commit log since the previous tag. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5d4e7147ce
commit
1aac8be531
1 file changed
+40
@@ -165,3 +165,43 @@ jobs:
|
||||
echo "${{ steps.meta.outputs.tags }}"
|
||||
echo '```'
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
# Cria a entrada em "Releases" do repositório. Só roda quando uma tag v* é
|
||||
# enviada, depois que todas as imagens foram publicadas. Usa o token do próprio
|
||||
# Actions, então não precisa de segredo extra.
|
||||
gitea-release:
|
||||
name: Cria a release no Gitea
|
||||
needs: [publish, prepare]
|
||||
if: startsWith(gitea.ref, 'refs/tags/v')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Release
|
||||
env:
|
||||
TAG: ${{ gitea.ref_name }}
|
||||
TOKEN: ${{ gitea.token }}
|
||||
API: ${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}
|
||||
NAMESPACE: ${{ env.REGISTRY }}/${{ needs.prepare.outputs.namespace }}
|
||||
run: |
|
||||
prev=$(git describe --tags --abbrev=0 "$TAG^" 2>/dev/null || true)
|
||||
range=${prev:+$prev..}$TAG
|
||||
{
|
||||
echo "## Imagens"
|
||||
echo
|
||||
echo '```'
|
||||
for s in protocols auth storage webmail migrations rspamd; do
|
||||
echo "$NAMESPACE/$s:${TAG#v}"
|
||||
done
|
||||
echo '```'
|
||||
echo
|
||||
echo "## Mudanças${prev:+ desde $prev}"
|
||||
echo
|
||||
git log --no-merges --format='- %s (%h)' "$range"
|
||||
} > notes.md
|
||||
pre=false; case "$TAG" in *-*) pre=true ;; esac
|
||||
jq -n --arg tag "$TAG" --arg name "LambdaMail ${TAG#v}" --rawfile body notes.md --argjson pre "$pre" \
|
||||
'{tag_name:$tag, name:$name, body:$body, prerelease:$pre}' > release.json
|
||||
curl -fsS -X POST "$API/releases" -H "Authorization: token $TOKEN" \
|
||||
-H 'Content-Type: application/json' -d @release.json
|
||||
Reference in new issue
Block a user