Licenses #617
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Licenses | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "23 18 * * *" | |
workflow_dispatch: | |
jobs: | |
licenses: | |
runs-on: ubuntu-latest | |
if: github.repository == 'SeldonIO/MLServer' # Do not run this on forks. | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: false | |
- name: Install Dependencies | |
run: | | |
poetry install --sync --only dev | |
- name: Generate Licenses | |
run: | | |
make licenses | |
git \ | |
--no-pager diff \ | |
--exit-code \ | |
./licenses/license_info.no_versions.csv | |
- name: Open PR with License Changes | |
if: ${{ failure() }} | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
add-paths: ./licenses | |
commit-message: Re-generate license info | |
branch: licenses/license-change | |
branch-suffix: timestamp | |
delete-branch: true | |
title: Re-generate License Info | |
body: " | |
# License Change Detected :warning:\n | |
Most likely, this has been triggered due to a licensing change in | |
one of our subdependencies, or the introduction of a new | |
subdependency. | |
This automated PR will re-generate the licenses to keep them up to | |
date." | |
reviewers: "SeldonIO/mlops" |