Merge branch 'WeblateOrg:main' into main #1
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
# Copyright © Michal Čihař <[email protected]> | |
# | |
# 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/[email protected] | |
with: | |
submodules: true | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
~/.cache/pre-commit | |
key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -r requirements-lint.txt | |
- 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@v5 | |
with: | |
branch: create-pull-request/licenses-update | |
title: 'utils: Update SPDX license data' | |
commit-message: 'utils: Update SPDX license data' | |
labels: | | |
dependencies | |
automerge |