diff --git a/.github/workflows/build_display_theme_cards.yml b/.github/workflows/build_display_theme_cards.yml deleted file mode 100644 index 002b0378e8..0000000000 --- a/.github/workflows/build_display_theme_cards.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Display Theme Cards - -on: - push: - paths: - - packages/modules/display_themes/cards/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js v24 - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - cache-dependency-path: packages/modules/display_themes/cards/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/display_themes/cards/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/display_themes/cards/web - if ! git diff --cached --quiet; then - git commit -m "Build Display Theme: Cards" - git push - else - echo "No changes to commit." - fi diff --git a/.github/workflows/build_display_theme_colors.yml b/.github/workflows/build_display_theme_colors.yml deleted file mode 100644 index c1853cfdd1..0000000000 --- a/.github/workflows/build_display_theme_colors.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Display Theme Colors - -on: - push: - paths: - - packages/modules/display_themes/colors/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js (v22) - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: npm - cache-dependency-path: packages/modules/display_themes/colors/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/display_themes/colors/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/display_themes/colors/web - if ! git diff --cached --quiet; then - git commit -m "Build Display Theme: Colors" - git push - else - echo "No changes to commit." - fi diff --git a/.github/workflows/build_themes.yml b/.github/workflows/build_themes.yml new file mode 100644 index 0000000000..59e69217ef --- /dev/null +++ b/.github/workflows/build_themes.yml @@ -0,0 +1,77 @@ + + + +name: Build Changed Web Themes +on: + push: + paths: + - packages/modules/display_themes/cards/source/** + - packages/modules/display_themes/colors/source/** + - packages/modules/web_themes/colors/source/** + - packages/modules/web_themes/koala/source/** + branches: + - test + + +jobs: + build-and-push-themes: + runs-on: ubuntu-latest + env: + THEME_BASES: | + packages/modules/display_themes/cards/source \ + packages/modules/display_themes/colors/source \ + packages/modules/web_themes/colors/source \ + packages/modules/web_themes/koala/source + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Node.js 24 + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + cache-dependency-path: | + packages/modules/display_themes/cards/source/package-lock.json + packages/modules/display_themes/colors/source/package-lock.json + packages/modules/web_themes/colors/source/package-lock.json + packages/modules/web_themes/koala/source/package-lock.json + + - name: Finde geänderte Themes + id: changed + run: | + git fetch origin master + git diff --name-only origin/master...HEAD \ + | grep -E '^($THEME_BASES)' \ + | awk -F/ '{print $4}' | sort -u > changed_themes.txt + cat changed_themes.txt + + - name: Installiere Abhängigkeiten und baue geänderte Themes + run: | + while read theme; do + for base in $THEME_BASES; do + if [ -d "$base/$theme" ]; then + echo "Installiere und baue Theme: $base/$theme" + cd "$base/$theme" + npm ci || npm install + npm run build + cd - + fi + done + done < changed_themes.txt + + - name: Commit und Push gebaute Themes + run: | + for base in $THEME_BASES; do + git add $base/*/dist/* 2>/dev/null || true + done + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + if ! git diff --cached --quiet; then + git commit -m "Build Web Themes" + git push + else + echo "No changes to commit." + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build_web_theme_colors.yml b/.github/workflows/build_web_theme_colors.yml deleted file mode 100644 index f0205e2e92..0000000000 --- a/.github/workflows/build_web_theme_colors.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Web Theme Colors - -on: - push: - paths: - - packages/modules/web_themes/colors/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js 24 - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - cache-dependency-path: packages/modules/web_themes/colors/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/web_themes/colors/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/web_themes/colors/web - if ! git diff --cached --quiet; then - git commit -m "Build Web Theme: Colors" - git push - else - echo "No changes to commit." - fi diff --git a/.github/workflows/build_web_theme_koala.yml b/.github/workflows/build_web_theme_koala.yml deleted file mode 100644 index af99325902..0000000000 --- a/.github/workflows/build_web_theme_koala.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Web Theme Koala - -on: - push: - paths: - - packages/modules/web_themes/koala/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js 24 - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - cache-dependency-path: packages/modules/web_themes/koala/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/web_themes/koala/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/web_themes/koala/web - if ! git diff --cached --quiet; then - git commit -m "Build Web Theme: Koala" - git push - else - echo "No changes to commit." - fi diff --git a/packages/modules/web_themes/koala/config.py b/packages/modules/web_themes/koala/config.py index cd228bc9c8..7a5e791a0a 100644 --- a/packages/modules/web_themes/koala/config.py +++ b/packages/modules/web_themes/koala/config.py @@ -23,7 +23,7 @@ def __init__(self, @auto_str class KoalaWebTheme: def __init__(self, - name: str = "Koala", + name: str = "Koala ", type: str = "koala", official: bool = True, configuration: KoalaWebThemeConfiguration = None) -> None: