-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (47 loc) · 1.27 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
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:
go-mod:
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 ::set-output name=ref::${tag_name}
elif ${{ github.event_name == 'push' }} ; then
echo ::set-output name=ref::${{ github.sha }}
else
echo ::set-output name=ref::${{ github.event.pull_request.head.sha }}
fi
- name: Checkout Source Code
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ steps.version.outputs.ref }}
- name: Check License Header
id: checklicense
uses: apache/skywalking-eyes@main