-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (44 loc) · 1.2 KB
/
licensed.yml
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
name: Check licenses of dependencies
on:
pull_request:
paths:
- .licenses/**
- packages/*/pyproject.toml
push:
branches: [main]
paths:
- packages/*/pyproject.toml
schedule:
- cron: '0 0 * * MON-FRI'
workflow_dispatch:
branches: [main]
jobs:
check-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'packages/*/pyproject.toml'
- run: python -m venv venv
- run: |
. venv/bin/activate
pip install -e packages/*
- uses: jonabc/setup-licensed@v1.1.2
with:
version: '3.x'
github_token: ${{ secrets.GITHUB_TOKEN }}
- run: licensed cache
- run: licensed status
- uses: slackapi/slack-github-action@v1.22.0
if: failure() && github.event_name == 'schedule'
with:
payload: |
{
"message": "License check for QURI Parts failed.",
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}