Update environment example, enhance copilot instructions, and add release skills documentation

This commit is contained in:
2026-09-26 17:08:02 +02:00
parent 13fcb70a27
commit c8809e56b2
6 changed files with 105 additions and 9 deletions
+26
View File
@@ -24,6 +24,32 @@ fi
cd "$repo_root"
docker build --tag "$image:$version" --tag "$image:latest" .
registry_username="${GITEA_USERNAME:-${DOCKER_USERNAME:-}}"
registry_token="${GITEA_TOKEN:-${DOCKER_PASSWORD:-}}"
unset GITEA_TOKEN DOCKER_PASSWORD
env_file="$repo_root/.env"
if [[ -f "$env_file" ]]; then
while IFS= read -r line || [[ -n "$line" ]]; do
line="${line%$'\r'}"
if [[ "$line" =~ ^GITEA_USERNAME=(.*)$ ]]; then
registry_username="${BASH_REMATCH[1]}"
elif [[ "$line" =~ ^GITEA_TOKEN=(.*)$ ]]; then
registry_token="${BASH_REMATCH[1]}"
fi
done < "$env_file"
fi
if [[ -n "$registry_username" || -n "$registry_token" ]]; then
if [[ -z "$registry_username" || -z "$registry_token" ]]; then
echo "Set both GITEA_USERNAME and GITEA_TOKEN in .env to log in automatically." >&2
exit 1
fi
if ! printf '%s' "$registry_token" | docker login --username "$registry_username" --password-stdin gitea.faerro.it; then
unset registry_token
exit 1
fi
unset registry_token
fi
docker push "$image:$version"
docker push "$image:latest"