Skip to content

Commit beb8e66

Browse files
authored
add license and dependency check workflow (#17)
1 parent fd373f8 commit beb8e66

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
name: License checker
18+
19+
on:
20+
pull_request:
21+
branches: [ main ]
22+
23+
jobs:
24+
check-license:
25+
runs-on: ubuntu-latest
26+
steps:
27+
# step 1 clear cache
28+
- name: Clear cache directory first before trying to restore from cache
29+
run: sudo rm -rf $(go env GOMODCACHE) && sudo rm -rf $(go env GOCACHE)
30+
shell: bash
31+
# step 2 checkout
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
# step 3 https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
35+
- uses: actions/setup-node@v3
36+
with:
37+
node-version: '14.x'
38+
# step 4 check license
39+
- name: Check License Header
40+
uses: apache/skywalking-eyes/header@8fc52baabc14c86294d96034bcc194cfa7f76b05
41+
with:
42+
log: info
43+
config: .licenserc.yaml
44+
mode: check
45+
# step 5 check dependencies
46+
- name: Check Dependencies' License
47+
uses: apache/skywalking-eyes/dependency@8fc52baabc14c86294d96034bcc194cfa7f76b05
48+
with:
49+
log: info
50+
config: .licenserc.yaml
51+
mode: check

0 commit comments

Comments
 (0)