Skip to content

Commit

Permalink
ci: run devDependencies only node-lts
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshoku committed Jan 27, 2024
1 parent 5c77d5e commit 2b27654
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,31 @@ on:
- main
- develop
pull_request:
types: [opened, reopened, synchronize]

jobs:
check_commit:
runs-on: ubuntu-latest
outputs:
skip_ci: ${{ steps.check_commit.outputs.skip_ci }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Check for devDependencies bump pull request
run: |
echo $(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }}) | grep -q -F "chore(deps-dev):"
if [ $? -eq 0 ] && [ ${{ matrix.node }} -eq 20 ]; then
echo "skip_ci=true" >> $GITHUB_OUTPUT
else
echo "skip_ci=false" >> $GITHUB_OUTPUT
fi
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['16', '18', '20']
needs: check_commit
if: ${{ needs.check_commit.outputs.skip_ci != 'true' }}
steps:
- uses: actions/checkout@v4
- name: Setup node ${{ matrix.node }}
Expand Down

0 comments on commit 2b27654

Please sign in to comment.