Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
448bb59672 | ||
|
|
a6719c6018 |
No files matched your search
@@ -220,7 +220,9 @@ jobs:
|
||||
gitea-release:
|
||||
name: Cria a release no Gitea
|
||||
needs: [publish, prepare]
|
||||
if: startsWith(gitea.ref, 'refs/tags/v')
|
||||
# Explicit, like publish: the build job upstream is skipped when the images
|
||||
# are reused, and the implicit success() would then skip this job too.
|
||||
if: ${{ !cancelled() && needs.publish.result == 'success' && startsWith(gitea.ref, 'refs/tags/v') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
@@ -233,21 +235,7 @@ jobs:
|
||||
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
|
||||
scripts/release-notes.sh "$TAG" "$NAMESPACE" > 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
|
||||
|
||||
+10
-1
@@ -6,18 +6,23 @@ budget_tokens: 2000
|
||||
|
||||
> OpenWolf's learning memory. Updated automatically as the AI learns from interactions.
|
||||
> Do not edit manually unless correcting an error.
|
||||
> Last updated: 2026-10-06
|
||||
> Last updated: 2026-10-30
|
||||
|
||||
## User Preferences
|
||||
|
||||
<!-- How the user likes things done. Code style, tools, patterns, communication. -->
|
||||
- Writes in Portuguese (pt-BR); answer in Portuguese. Wants things finished end to end: merged, released, deployed and checked in production, without being asked again (said so on 2026-10-22).
|
||||
- Likes a clean interface with every function reachable (Apple / Anthropic as references, Outlook over Gmail), dark theme by default with a light one.
|
||||
- [2026-10-30] CI must be efficient: never redo work already done for the same content. Hash what goes into the artifact (the `inputs-<hash>` image tag, or a filtered `git ls-tree` hash), ask the registry, and skip CI and build when it exists; a version tag or a docs/workflow-only merge only re-points tags. Do not run `ci.yml` on `main` by push when `release.yml` already calls it. Use `paths-ignore` for docs and tool state (`.wolf`, `.claude`, `.superset`). The user repeated this several times and was angry when a tag was about to recompile the Next.js build.
|
||||
- [2026-10-30] Keep repositories clean: after a branch is merged, delete it on Gitea and locally (`git push gitea --delete <b>`, `git branch -d <b>`). Never touch the user's own unmerged branches.
|
||||
- [2026-10-30] Every tool gets semver tags and a Gitea Release (Releases tab, not just container images) with notes from the matching `CHANGELOG.md` section (`scripts/release-notes.sh`). Keep the changelog updated under Unreleased. A tag job that creates the release must use an explicit `if: ${{ !cancelled() && needs.<job>.result == 'success' && startsWith(gitea.ref, 'refs/tags/v') }}`.
|
||||
- [2026-10-30] Source of truth is Gitea (`git.lucasrguerra.dev.br`, remote `gitea`, SSH on port 22 through the host). The GitHub account is suspended (404): never push to or depend on GitHub. Workflows live in `.gitea/workflows` and use the `gitea.*` context.
|
||||
|
||||
## Key Learnings
|
||||
|
||||
- **Project:** LambdaMail
|
||||
- **Description:** A self-hosted mail server with an integrated webmail and admin console, built to
|
||||
- [2026-10-30] Release flow: `plan` job hashes `services/ migrations/ config/` → `inputs-<hash>`; reuse takes ~1 min instead of 30. A job downstream of a skipped `build` needs explicit status checks in its `if`. Images: `git.lucasrguerra.dev.br/lucasrguerra/lambdamail/<service>`. v1.0.0 was the first tag (no history survived from GitHub). Production deploy is blocked until the Coolify app's source is switched from Public GitHub to Gitea in the Coolify UI (API cannot); deploy only when the user is assured everything is right. Single `.env.example` + `scripts/init-env.sh` (`make env`).
|
||||
|
||||
## Do-Not-Repeat
|
||||
|
||||
@@ -31,6 +36,10 @@ budget_tokens: 2000
|
||||
- [2026-10-22] A `<Button>` inside a `<form>` submits it unless `type="button"` (Undo send used to resend the message).
|
||||
- [2026-10-22] Never run side effects inside a React state updater (it can run twice).
|
||||
- [2026-10-23] Inside a JS template literal `\\d` silently becomes `d`. For scripts embedded in template strings write `[0-9]` instead of `\\d`, and test the script's behaviour, not only that it is present.
|
||||
- [2026-10-30] On the Gitea runners never mount the job workspace into a container with `-v "$PWD:..."`: the Docker daemon (DinD) cannot see it and mounts an empty directory. Use `docker create` + `docker cp` + `docker start -a`.
|
||||
- [2026-10-30] Do not use `aquasecurity/trivy-action` (clones Trivy from the Gitea server), `actions/upload-artifact` v4+, the `gha` buildx cache or `rustsec/audit-check`. Run Trivy from `aquasec/trivy` with `-v trivy-cache:/root/.cache/`, use the registry for cache, `cargo audit` for Rust. The runner sets `GITHUB_OUTPUT`/`GITHUB_STEP_SUMMARY` but NOT `GITEA_OUTPUT` etc.
|
||||
- [2026-10-30] Pushing old tags to Gitea triggers the `.github/workflows/release.yml` found in those old commits (Gitea falls back to `.github` where `.gitea` is absent). They queue forever on missing macOS/Windows runners: cancel them (`POST /repos/{o}/{r}/actions/runs/{id}/cancel`) right after pushing tags.
|
||||
- [2026-10-30] The runner Docker daemons persist between jobs: steps that create networks/containers must be idempotent and clean up with `if: always()`.
|
||||
|
||||
## Decision Log
|
||||
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
# Prints the release notes for a tag: the images it publishes, then the matching
|
||||
# section of CHANGELOG.md (the commit log since the previous tag if the changelog
|
||||
# has no section for that version).
|
||||
#
|
||||
# scripts/release-notes.sh v1.2.3 git.example.com/owner/project
|
||||
set -euo pipefail
|
||||
|
||||
tag=${1:?usage: release-notes.sh <tag> <image-namespace>}
|
||||
namespace=${2:?usage: release-notes.sh <tag> <image-namespace>}
|
||||
version=${tag#v}
|
||||
|
||||
echo "## Images"
|
||||
echo
|
||||
echo '```'
|
||||
for service in protocols auth storage webmail migrations rspamd; do
|
||||
echo "$namespace/$service:$version"
|
||||
done
|
||||
echo '```'
|
||||
echo
|
||||
|
||||
section=""
|
||||
if [ -f CHANGELOG.md ]; then
|
||||
section=$(awk -v head="## [$version]" '
|
||||
index($0, head) == 1 { found = 1; next }
|
||||
found && /^## \[/ { exit }
|
||||
found && /^\[[^]]+\]: / { next }
|
||||
found { print }
|
||||
' CHANGELOG.md)
|
||||
fi
|
||||
|
||||
if [ -n "$(printf '%s' "$section" | tr -d '[:space:]')" ]; then
|
||||
printf '%s\n' "$section"
|
||||
else
|
||||
previous=$(git describe --tags --abbrev=0 "$tag^" 2>/dev/null || true)
|
||||
echo "## Changes${previous:+ since $previous}"
|
||||
echo
|
||||
git log --no-merges --format='- %s (%h)' "${previous:+$previous..}$tag"
|
||||
fi
|
||||
Reference in new issue
Block a user