Skip to content

Commit

Permalink
ci: change to run dev devendency bump pull request only on 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 def7105
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- main
- develop
pull_request:
types: [opened, reopened, synchronize]

jobs:
build:
Expand All @@ -16,6 +15,16 @@ jobs:
node: ['16', '18', '20']
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Check for devDependencies bump pull request
run: |
message=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})
if [ echo "$message" | grep -q -F "chore(deps-dev):" ] && [ ${{ matrix.node }} != "20" ]; then
echo "::set-output name=skip_ci::true"
else
echo "::set-output name=skip_ci::false"
fi
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit def7105

Please sign in to comment.