Skip to content

Commit 041a989

Browse files
sebthomakurtakov
authored andcommitted
ci: don't run license check if dependencies don't change
1 parent 292d8ab commit 041a989

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/licensecheck.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
1-
# This workflow will build a Java project with Maven
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3-
1+
# https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
42
name: License check
53

6-
on:
4+
on: # https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows
75
push:
86
branches:
97
- 'master'
8+
paths:
9+
- '**/package.json'
10+
- '**/package-lock.json'
11+
- '**/pom.xml'
12+
- '**/*.target'
1013
pull_request:
1114
branches:
1215
- 'master'
16+
paths:
17+
- '**/package.json'
18+
- '**/package-lock.json'
19+
- '**/pom.xml'
20+
- '**/*.target'
1321
issue_comment:
1422
types: [created]
15-
23+
workflow_dispatch:
24+
# https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_dispatch
25+
1626
jobs:
27+
###########################################################
1728
call-mvn-license-check:
29+
###########################################################
1830
uses: eclipse-dash/dash-licenses/.github/workflows/mavenLicenseCheck.yml@master
1931
with:
2032
projectId: tools.wildwebdeveloper
@@ -23,7 +35,10 @@ jobs:
2335
gitlabAPIToken: ${{ secrets.GITLAB_API_TOKEN }}
2436
permissions:
2537
pull-requests: write
38+
39+
###########################################################
2640
npm-check:
41+
###########################################################
2742
if: github.event_name != 'issue_comment' || ( github.event.issue.pull_request != '' && (github.event.comment.body == '/request-license-review') )
2843
# Run on all non-comment events specified by the calling workflow and for comments on PRs that have a corresponding body.
2944
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)