Skip to content

chore: migrate to pyproject.toml #251

chore: migrate to pyproject.toml

chore: migrate to pyproject.toml #251

# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: licenses update
on:
push:
branches:
- deepsource-fix-**
- renovate/**
- main
paths:
- .github/workflows/licenses-update.yml
- scripts/generate-license-data
- scripts/spdx-license-list
jobs:
licenses-update:
runs-on: ubuntu-22.04
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4.1.2
with:
submodules: true
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install $(sed -n 's/.*"\(pip==\([^"]*\)\)".*/\1/p' pyproject.toml)
pip install $(sed -n 's/.*"\(wheel==\([^"]*\)\)".*/\1/p' pyproject.toml)
pip install $(sed -n 's/.*"\(pre-commit==\([^"]*\)\)".*/\1/p' pyproject.toml)
- run: ./scripts/generate-license-data
- name: Update renovate branch
if: github.ref != 'refs/heads/main'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'utils: Update SPDX license data'
- name: Create Pull Request
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v6
with:
branch: create-pull-request/licenses-update
title: 'utils: Update SPDX license data'
commit-message: 'utils: Update SPDX license data'
labels: |
dependencies
automerge