forked from SeldonIO/seldon-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
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/seldon-core' # Do not run this on forks. | ||
steps: | ||
- name: Get github access token | ||
run: | | ||
echo $API_KEY > ~/.github_api_token | ||
env: | ||
API_KEY : ${{ secrets.GH_API_TOKEN }} | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Set up Go 1.20 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
cache: false | ||
- name: Install Dependencies | ||
run: | | ||
make install-go-license-tools | ||
- name: Generate Licenses | ||
run: | | ||
make update-3rd-party-licenses | ||
git --no-pager diff --name-only --exit-code | ||
- name: Open PR with License Changes | ||
if: ${{ failure() }} | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
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: sakoush, lc525 |