Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 28f7db172c | |||
| 2063656f29 | |||
| 592cfa405f | |||
| 0a32cd1d21 | |||
| 4516cf4ec6 | |||
| c6f60d1ca7 | |||
| aa35e97cbb | |||
| 57c142c8ef | |||
| 4843bf1d75 | |||
| d02cf29a1d | |||
| 3b4c9c2529 | |||
| fdf03349cf | |||
| 439f9c1dad | |||
| 260bfea716 | |||
| b3a3f3557c | |||
| 621556b38c | |||
| 5c55f2c7f4 | |||
| bb4bccb175 | |||
| ae835e5008 | |||
| 1d3aa1c9f2 | |||
| 23cab2da5e | |||
| 44216f9395 |
@@ -1,59 +1,58 @@
|
|||||||
name: 🔁 Weekly Branch Promotions
|
name: 🔁 Branch Promotions
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * 1"
|
- cron: "0 6 * * 1,4" # Lundi et Jeudi à 6h UTC (design → develop)
|
||||||
|
- cron: "0 6 * * 1" # Lundi à 6h UTC (develop → main)
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
promotion:
|
||||||
|
description: "Which promotion to run"
|
||||||
|
required: true
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- design-to-develop
|
||||||
|
- develop-to-main
|
||||||
|
- both
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: weekly-branch-promotions
|
group: branch-promotions
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
open-promotion-pr:
|
design-to-develop:
|
||||||
name: Open ${{ matrix.head }} → ${{ matrix.base }}
|
name: Open design → develop
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
if: |
|
||||||
fail-fast: false
|
(github.event_name == 'schedule') ||
|
||||||
matrix:
|
(github.event_name == 'workflow_dispatch' && (github.event.inputs.promotion == 'design-to-develop' || github.event.inputs.promotion == 'both'))
|
||||||
include:
|
|
||||||
- head: develop
|
|
||||||
base: design
|
|
||||||
title: "chore: merge develop into design"
|
|
||||||
- head: design
|
|
||||||
base: main
|
|
||||||
title: "chore: merge design into main"
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: ⬇️ Checkout
|
- name: ⬇️ Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: 🔁 Open promotion PR
|
- name: 🔁 Open promotion PR
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
BASE_BRANCH: ${{ matrix.base }}
|
|
||||||
HEAD_BRANCH: ${{ matrix.head }}
|
|
||||||
PR_TITLE: ${{ matrix.title }}
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
git fetch origin "$BASE_BRANCH" "$HEAD_BRANCH"
|
git fetch origin develop design
|
||||||
|
|
||||||
if git merge-base --is-ancestor "origin/$HEAD_BRANCH" "origin/$BASE_BRANCH"; then
|
if git merge-base --is-ancestor origin/design origin/develop; then
|
||||||
echo "No promotion needed: $BASE_BRANCH already contains $HEAD_BRANCH."
|
echo "No promotion needed: develop already contains design."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
existing_pr="$(gh pr list \
|
existing_pr="$(gh pr list \
|
||||||
--state open \
|
--state open \
|
||||||
--base "$BASE_BRANCH" \
|
--base develop \
|
||||||
--head "$GITHUB_REPOSITORY_OWNER:$HEAD_BRANCH" \
|
--head "$GITHUB_REPOSITORY_OWNER:design" \
|
||||||
--json number \
|
--json number \
|
||||||
--jq '.[0].number // empty')"
|
--jq '.[0].number // empty')"
|
||||||
|
|
||||||
@@ -63,7 +62,50 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
gh pr create \
|
gh pr create \
|
||||||
--base "$BASE_BRANCH" \
|
--base develop \
|
||||||
--head "$HEAD_BRANCH" \
|
--head design \
|
||||||
--title "$PR_TITLE" \
|
--title "chore: merge design into develop" \
|
||||||
--body "Automated weekly promotion PR from \`$HEAD_BRANCH\` to \`$BASE_BRANCH\`."
|
--body "Automated promotion PR from \`design\` to \`develop\`."
|
||||||
|
|
||||||
|
develop-to-main:
|
||||||
|
name: Open develop → main
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: |
|
||||||
|
(github.event_name == 'schedule' && github.event.schedule == '0 6 * * 1') ||
|
||||||
|
(github.event_name == 'workflow_dispatch' && (github.event.inputs.promotion == 'develop-to-main' || github.event.inputs.promotion == 'both'))
|
||||||
|
steps:
|
||||||
|
- name: ⬇️ Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 🔁 Open promotion PR
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
git fetch origin main develop
|
||||||
|
|
||||||
|
if git merge-base --is-ancestor origin/develop origin/main; then
|
||||||
|
echo "No promotion needed: main already contains develop."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
existing_pr="$(gh pr list \
|
||||||
|
--state open \
|
||||||
|
--base main \
|
||||||
|
--head "$GITHUB_REPOSITORY_OWNER:develop" \
|
||||||
|
--json number \
|
||||||
|
--jq '.[0].number // empty')"
|
||||||
|
|
||||||
|
if [ -n "$existing_pr" ]; then
|
||||||
|
echo "Promotion PR already open: #$existing_pr."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
gh pr create \
|
||||||
|
--base main \
|
||||||
|
--head develop \
|
||||||
|
--title "chore: merge develop into main" \
|
||||||
|
--body "Automated weekly promotion PR from \`develop\` to \`main\`."
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import tseslint from "typescript-eslint";
|
|||||||
import { defineConfig, globalIgnores } from "eslint/config";
|
import { defineConfig, globalIgnores } from "eslint/config";
|
||||||
|
|
||||||
export default defineConfig([
|
export default defineConfig([
|
||||||
globalIgnores(["dist"]),
|
globalIgnores(["dist", "POC-grass"]),
|
||||||
{
|
{
|
||||||
files: ["**/*.{ts,tsx}"],
|
files: ["**/*.{ts,tsx}"],
|
||||||
extends: [
|
extends: [
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,7 @@
|
|||||||
import { useMemo } from "react";
|
import { useEffect, useMemo } from "react";
|
||||||
import { useLoggedGLTF } from "@/hooks/three/useLoggedGLTF";
|
import { useLoggedGLTF } from "@/hooks/three/useLoggedGLTF";
|
||||||
import type { ModelTransformProps, Vector3Tuple } from "@/types/three/three";
|
import type { ModelTransformProps, Vector3Tuple } from "@/types/three/three";
|
||||||
|
import { disposeObject3D } from "@/utils/three/dispose";
|
||||||
|
|
||||||
export interface SimpleModelConfig extends ModelTransformProps {
|
export interface SimpleModelConfig extends ModelTransformProps {
|
||||||
modelPath: string;
|
modelPath: string;
|
||||||
@@ -29,6 +30,12 @@ export function SimpleModel({
|
|||||||
});
|
});
|
||||||
const model = useMemo(() => scene.clone(true), [scene]);
|
const model = useMemo(() => scene.clone(true), [scene]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
return () => {
|
||||||
|
disposeObject3D(model);
|
||||||
|
};
|
||||||
|
}, [model]);
|
||||||
|
|
||||||
const parsedScale =
|
const parsedScale =
|
||||||
typeof scale === "number" ? ([scale, scale, scale] as Vector3Tuple) : scale;
|
typeof scale === "number" ? ([scale, scale, scale] as Vector3Tuple) : scale;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { useFrame, useThree } from "@react-three/fiber";
|
import { useFrame, useThree } from "@react-three/fiber";
|
||||||
import { useGLTF } from "@react-three/drei";
|
import { useGLTF } from "@react-three/drei";
|
||||||
import { Component, useMemo, useRef, type ReactNode } from "react";
|
import { Component, useEffect, useMemo, useRef, type ReactNode } from "react";
|
||||||
import * as THREE from "three";
|
import * as THREE from "three";
|
||||||
import { useLoggedGLTF } from "@/hooks/three/useLoggedGLTF";
|
import { useLoggedGLTF } from "@/hooks/three/useLoggedGLTF";
|
||||||
|
import { disposeObject3D } from "@/utils/three/dispose";
|
||||||
|
|
||||||
interface SkyModelProps {
|
interface SkyModelProps {
|
||||||
modelPath: string;
|
modelPath: string;
|
||||||
@@ -80,6 +81,12 @@ function SkyModelContent({
|
|||||||
});
|
});
|
||||||
const model = useMemo(() => createSkyModel(scene), [scene]);
|
const model = useMemo(() => createSkyModel(scene), [scene]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
return () => {
|
||||||
|
disposeObject3D(model);
|
||||||
|
};
|
||||||
|
}, [model]);
|
||||||
|
|
||||||
useFrame(() => {
|
useFrame(() => {
|
||||||
groupRef.current?.position.copy(camera.position);
|
groupRef.current?.position.copy(camera.position);
|
||||||
});
|
});
|
||||||
@@ -122,5 +129,5 @@ function createSkyMaterial<T extends THREE.Material>(material: T): T {
|
|||||||
return skyMaterial as T;
|
return skyMaterial as T;
|
||||||
}
|
}
|
||||||
|
|
||||||
useGLTF.preload("/models/skybox/skybox.gltf");
|
useGLTF.preload("/models/skybox/model.gltf");
|
||||||
useGLTF.preload(LEGACY_SKY_MODEL_PATH);
|
useGLTF.preload(LEGACY_SKY_MODEL_PATH);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user