-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
83 lines (72 loc) · 2.76 KB
/
unicodechars.yml
File metadata and controls
83 lines (72 loc) · 2.76 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Copyright © Michal Čihař <michal@weblate.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: unicodechars update
on:
push:
branches:
- renovate/**
- main
paths:
- .github/workflows/unicodechars.yml
- scripts/generate-unicodechars.py
workflow_dispatch:
pull_request:
paths:
- .github/workflows/unicodechars.yml
- scripts/generate-unicodechars.py
permissions:
contents: read
jobs:
unicodechars-update:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
if: github.event_name != 'pull_request'
with:
token: ${{ secrets.WEBLATE_CI_TOKEN }}
persist-credentials: true
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
if: github.event_name == 'pull_request'
with:
persist-credentials: false
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
enable-cache: false
version: 0.9.18
- name: Set up Python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: '3.14'
- name: Install Python dependencies
run: uv sync --only-group pre-commit
- run: ./scripts/generate-unicodechars.py > weblate/utils/unicodechars.py
- run: uv run --only-group pre-commit pre-commit run --all
continue-on-error: true
- run: git diff
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
if: github.event_name == 'pull_request' && github.actor != 'renovate[bot]'
with:
msg: 'chore: update unicode characters data'
- name: Update current branch
if: github.event_name == 'push' && github.ref_name != 'main'
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
with:
commit_message: 'chore: update unicode characters data'
- name: Create Pull Request
id: cpr
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.ref_name == 'main'
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
with:
branch: create-pull-request/jsonschema-update
title: 'chore: update unicode characters data'
commit-message: 'chore: update unicode characters data'
token: ${{ secrets.WEBLATE_CI_TOKEN }}
labels: |
dependencies
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation && steps.cpr.outputs.pull-request-operation != 'none'
run: gh pr merge --rebase --auto "$PR_NUMBER"
env:
GH_TOKEN: ${{ secrets.WEBLATE_CI_TOKEN }}
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}