forked from WeblateOrg/weblate
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 1.57 KB
/
licenses-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# 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