-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (44 loc) · 1.51 KB
/
license.yml
File metadata and controls
54 lines (44 loc) · 1.51 KB
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
name: "Check license & format"
on:
push:
branches: [ main ]
pull_request_target:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout commit
if: github.event_name == 'push'
uses: actions/checkout@v3
- name: Checkout pull request
if: github.event_name == 'pull_request_target'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Check license headers
uses: apache/skywalking-eyes@v0.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config: .github/licenserc.yml
mode: fix
- name: Commit licensed files
if: github.event_name == 'pull_request_target'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: EndBug/add-and-commit@v8.0.2
with:
default_author: github_actions
message: "chore: add license header(s)"
- name: Create pull request
if: github.event_name == 'push'
uses: peter-evans/create-pull-request@v3
with:
author: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
commit-message: "chore: add license header(s)"
title: "chore: add license header(s)"
body: Add missing license header(s) in source and test code.
branch: add-license