-
Notifications
You must be signed in to change notification settings - Fork 17
56 lines (50 loc) · 1.33 KB
/
lint-license.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Auto Licnese Lint
on:
pull_request:
paths:
- '**.go'
- '**.sh'
push:
branches:
- main
paths:
- '**.go'
- '**.sh'
workflow_dispatch:
inputs:
ref:
description: 'sha, ref, branch'
required: true
default: main
permissions: read-all
# for each pr, queue all workflows
# concurrency:
# group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
# cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checking Ref
id: version
shell: bash
run: |
if ${{ github.event_name == 'workflow_dispatch' }}; then
tag_name=${{ github.event.inputs.ref }}
echo "RUN_REF=${tag_name}" >> $GITHUB_ENV
elif ${{ github.event_name == 'push' }} ; then
echo "RUN_REF=${{ github.sha }}" >> $GITHUB_ENV
else
echo "RUN_REF=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
fi
- name: Checkout Source Code
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ env.RUN_REF }}
- name: Check License Header
id: checklicense
uses: apache/skywalking-eyes@main
with:
log: debug
config: .github/licenserc.yaml