-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (36 loc) · 1.25 KB
/
check_licenses.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
# A CI configuration to check for licenses in Dart files.
name: License Check
# Callers of this workflow should use it as follows:
#
# name: License Check
# on:
# pull_request:
# branches: [ main ]
# types: [opened, synchronize, reopened, labeled, unlabeled]
# push:
# tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
# jobs:
# check_licenses:
# uses: dart-lang/ecosystem/.github/workflows/check_licenses.yml@main
jobs:
check_licenses:
# These permissions are required for authentication using OIDC and to enable
# us to create comments on PRs.
permissions:
id-token: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: stable
- name: Install firehose
run: dart pub global activate firehose
- name: Check package file licenses
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.number }}
PR_LABELS: "${{ join(github.event.pull_request.labels.*.name) }}"
run: dart pub global run firehose --check_licenses