-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refresh and automate updating licenses list (#489)
- Loading branch information
Showing
1 changed file
with
39 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,39 @@ | ||
name: "Update licenses" | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 1 * *" # run once a month | ||
|
||
jobs: | ||
update-licenses: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Generate token | ||
id: generate_token | ||
uses: tibdex/github-app-token@v1 | ||
with: | ||
app_id: ${{ secrets.POETRY_TOKEN_APP_ID }} | ||
private_key: ${{ secrets.POETRY_TOKEN_APP_KEY }} | ||
|
||
- name: Update licenses list | ||
run: | | ||
python src/poetry/core/spdx/helpers.py | ||
- name: Create PR if necessary | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
commit-message: "Automated licenses list update" | ||
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | ||
branch: "license-autoupdate" | ||
title: "Automated licenses list update" | ||
body: "Full log: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" |