Skip to content

Commit

Permalink
Only try to build on javascript changes (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored Sep 10, 2024
1 parent 4bc9647 commit d1b6f95
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/renovate-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down

0 comments on commit d1b6f95

Please sign in to comment.