name: "Build Lib Workflow" on: workflow_call: inputs: base_ref: description: 'Base branch for affected calculation' required: false type: string default: 'develop' env: NODE_OPTIONS: "--max-old-space-size=5120" jobs: build: name: "Build affected libs" runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout repository uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Setup environment id: setup-env uses: ./.github/actions/setup with: cache-suffix: build full-setup: 'false' - name: Install dependencies if: ${{ steps.setup-env.outputs.node-modules-cache-hit != 'true' }} run: npm ci - name: Build affected libs env: BASE_REF: ${{ inputs.base_ref }} run: npx nx affected --target=build --base=origin/$BASE_REF --head=HEAD --configuration=production --exclude=stories - name: Save nx cache if: ${{ success() }} uses: ./.github/actions/save-nx-cache with: cache-suffix: build