From 2ab167fa579370505ee897bb135f9811fea01f95 Mon Sep 17 00:00:00 2001 From: berfinyuksel <99557970+berfinyuksel@users.noreply.github.com> Date: Wed, 18 Mar 2026 15:27:10 +0100 Subject: [PATCH] Update Studio Frontend Build workflow --- .github/workflows/studio-frontend-build.yaml | 153 +------------------ 1 file changed, 7 insertions(+), 146 deletions(-) diff --git a/.github/workflows/studio-frontend-build.yaml b/.github/workflows/studio-frontend-build.yaml index 480317d..3c39ede 100644 --- a/.github/workflows/studio-frontend-build.yaml +++ b/.github/workflows/studio-frontend-build.yaml @@ -1,156 +1,17 @@ name: "Studio Frontend Build" - + on: push: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "feature-*" - - "nightly" - - "studio" paths: - "assets/studio/**" - pull_request_target: - branches: - - "[0-9]+.[0-9]+" - - "[0-9]+.x" - - "*_actions" - - "feature-*" - - "nightly" + pull_request: paths: - "assets/studio/**" workflow_dispatch: - -env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - + permissions: - contents: read - + contents: write + jobs: - install: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ env.BRANCH_NAME }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Cache npm dependencies - uses: actions/cache@v4 - with: - path: ./assets/studio/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Install dependencies - working-directory: ./assets/studio - run: npm ci - - lint: - needs: install - runs-on: ubuntu-latest - - permissions: - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ env.BRANCH_NAME }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Cache npm dependencies - uses: actions/cache@v4 - with: - path: ./assets/studio/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Run code linting - working-directory: ./assets/studio - run: npm run lint-fix - - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: Apply eslint-fixer changes - - check-types: - needs: install - runs-on: ubuntu-latest - - permissions: - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ env.BRANCH_NAME }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Cache npm dependencies - uses: actions/cache@v4 - with: - path: ./assets/studio/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Run code linting - working-directory: ./assets/studio - run: npm run check-types - - build: - needs: - - lint - - check-types - runs-on: ubuntu-latest - - permissions: - contents: write - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ env.BRANCH_NAME }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Cache npm dependencies - uses: actions/cache@v4 - with: - path: ./assets/studio/node_modules - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Run production build - working-directory: ./assets/studio - run: npm run build - - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - file_pattern: './src/Resources/public/studio/' - commit_message: Automatic frontend build + studio-frontend-build: + uses: pimcore/workflows-collection-public/.github/workflows/reusable-studio-frontend-build.yaml@main