mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-30 04:56:46 +08:00
59 lines
1.9 KiB
YAML
59 lines
1.9 KiB
YAML
# Copyright © Michal Čihař <michal@weblate.org>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
name: licenses update
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- renovate/**
|
|
- dependabot/**
|
|
- main
|
|
paths:
|
|
- .github/workflows/licenses-update.yml
|
|
- scripts/generate-license-data.py
|
|
- scripts/spdx-license-list
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
licenses-update:
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name != 'pull_request' && github.repository_owner == 'WeblateOrg'
|
|
with:
|
|
token: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]
|
|
persist-credentials: true
|
|
submodules: true
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name != 'pull_request' && github.repository_owner != 'WeblateOrg'
|
|
with:
|
|
persist-credentials: true
|
|
submodules: true
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
persist-credentials: false
|
|
submodules: true
|
|
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
path: ~/.cache/pre-commit
|
|
key: ${{ runner.os }}-pre-commit-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: '3.14'
|
|
- run: ./scripts/generate-license-data.py
|
|
|
|
- name: Commit or create pull request
|
|
uses: ./.github/actions/auto-commit
|
|
with:
|
|
message: 'utils: Update SPDX license data'
|
|
pr-branch: create-pull-request/licenses-update
|
|
pr-labels: |
|
|
dependencies
|
|
github-token: ${{ secrets.WEBLATE_CI_TOKEN }} # zizmor: ignore[secrets-outside-env]
|