feat: import IMVU products into a catalog
Pull request / title (pull_request) Successful in 1s
CI / build (pull_request) Successful in 31s
CI / image (pull_request) Skipped

The importer from t5de-hub's docs/imports.md: says hello to the hub with its key pair, follows the console's config
(paused, rate, jobs at a time, IMVU accounts, whose sealed passwords it keeps), claims jobs, finds each product's
newest revision on IMVU's CDN, converts it (originals for placeholders, no _contents.json, ProductRating from IMVU's
rating), checks it by t5de-api's pack rules and uploads it to the catalog with an import token.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
dhkatzandClaude Opus 5.5 committed 2026-11-08 06:04:48 -08:00
1 parent 2b0d27831e
commit e8578e4a71
26 files changed
+2345 -1

No files matched your search

+69
View File
@@ -0,0 +1,69 @@
# Tests the importer and builds t5de-importer for Linux (static); then, for main and vX.Y.Z tags, builds its image and
# pushes it to git.t5de.dev. CI never deploys.
name: CI
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
# T5DE's modules (t5de-api) come straight from its Gitea, not through Go's public module proxy.
GOPRIVATE: git.t5de.dev
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Test
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then echo "Not gofmt-formatted: $unformatted"; exit 1; fi
go vet ./...
go test ./...
# Static and reproducible: no cgo, no paths, no build ID.
- name: Build t5de-importer
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -buildvcs=false \
-ldflags "-s -w -buildid= -X git.t5de.dev/t5de/t5de-importer/internal/buildinfo.Version=${GITHUB_SHA::12}" \
-o dist/t5de-importer ./cmd/t5de-importer
sha256sum dist/t5de-importer
# main → :latest-main and :main-<commit>; vX.Y.Z → :X.Y.Z, :X.Y and :latest. Built by the runner's Docker; the build
# fetches T5DE's Go modules from git.t5de.dev at the address the runner gives this job.
image:
needs: build
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and push
env:
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
IMAGE: git.t5de.dev/t5de/t5de-importer
run: |
case "$GITHUB_REF" in
refs/heads/main) version="main-${GITHUB_SHA::12}"; tags="latest-main $version" ;;
refs/tags/v*)
version="${GITHUB_REF#refs/tags/v}"
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Not a vX.Y.Z tag: no image"; exit 0; }
tags="$version ${version%.*} latest" ;;
*) echo "Not main or a tag: no image"; exit 0 ;;
esac
git_ip=$(getent ahostsv4 git.t5de.dev | awk '{print $1; exit}')
echo "$REGISTRY_TOKEN" | docker login git.t5de.dev -u deploy --password-stdin
docker build --add-host "git.t5de.dev:$git_ip" --build-arg VERSION="$version" \
--label org.opencontainers.image.source="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
--label org.opencontainers.image.revision="$GITHUB_SHA" --label org.opencontainers.image.version="$version" \
$(for t in $tags; do echo "-t $IMAGE:$t"; done) .
for t in $tags; do docker push -q "$IMAGE:$t"; done
docker logout git.t5de.dev