From d1b6f95a1d91680db29df7141e925db7f195c8d1 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 10 Sep 2024 10:08:46 -0700 Subject: [PATCH] Only try to build on javascript changes (#335) --- .github/workflows/renovate-build.yml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/renovate-build.yml b/.github/workflows/renovate-build.yml index 0ea0c36b..5a848435 100644 --- a/.github/workflows/renovate-build.yml +++ b/.github/workflows/renovate-build.yml @@ -13,11 +13,29 @@ defaults: shell: bash jobs: + check: + runs-on: ubuntu-22.04 + outputs: + javascript: ${{ steps.filter.outputs.javascript }} + steps: + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: Check for changes + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: filter + with: + filters: | + javascript: + - 'package.json' + - 'yarn.lock' build: - if: ${{ github.actor == 'renovate[bot]' }} + if: ${{ github.actor == 'renovate[bot]' && needs.check.outputs.javascript == 'true' }} runs-on: ubuntu-22.04 + needs: check steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Checkout repository + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: ref: ${{ github.head_ref }} token: ${{ secrets.COMMIT_PAT }} @@ -29,10 +47,10 @@ jobs: node-version-file: .nvmrc - name: Install dependencies - run: yarn install + run: corepack yarn install - name: Run build - run: yarn build + run: corepack yarn build - name: Commit changes id: commit