2024-04-09 00:33:58 +02:00
|
|
|
name: Sync Files
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- "build.gradle"
|
|
|
|
- "src/main/resources/messages_*.properties"
|
2024-06-26 22:47:20 +02:00
|
|
|
- "scripts/ignore_translation.toml"
|
2024-04-09 00:33:58 +02:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
sync-readme:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-12-21 13:28:35 +01:00
|
|
|
- name: Harden Runner
|
|
|
|
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
|
|
|
|
with:
|
|
|
|
egress-policy: audit
|
|
|
|
|
|
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
2024-04-09 00:33:58 +02:00
|
|
|
- name: Set up Python
|
2024-12-21 13:28:35 +01:00
|
|
|
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
|
2024-04-09 00:33:58 +02:00
|
|
|
with:
|
|
|
|
python-version: "3.x"
|
2024-04-28 00:26:12 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pip install tomlkit
|
2024-04-09 00:33:58 +02:00
|
|
|
- name: Sync README
|
|
|
|
run: python scripts/counter_translation.py
|
|
|
|
- name: Set up git config
|
|
|
|
run: |
|
2024-08-31 15:30:18 +02:00
|
|
|
git config --global user.name "github-actions[bot]"
|
|
|
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
2024-04-09 00:33:58 +02:00
|
|
|
- name: Run git add
|
|
|
|
run: |
|
|
|
|
git add .
|
|
|
|
git diff --staged --quiet || git commit -m ":memo: Sync README
|
|
|
|
> Made via sync_files.yml" || echo "no changes"
|
|
|
|
- name: Create Pull Request
|
2024-12-21 13:28:35 +01:00
|
|
|
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
2024-04-09 00:33:58 +02:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
commit-message: Update files
|
|
|
|
committer: GitHub Action <action@github.com>
|
|
|
|
author: GitHub Action <action@github.com>
|
|
|
|
signoff: true
|
|
|
|
branch: sync_readme
|
|
|
|
title: ":memo: Update README: Translation Progress Table"
|
|
|
|
body: |
|
|
|
|
Auto-generated by [create-pull-request][1]
|
|
|
|
|
|
|
|
[1]: https://github.com/peter-evans/create-pull-request
|
|
|
|
draft: false
|
|
|
|
delete-branch: true
|
2024-07-22 22:15:10 +02:00
|
|
|
labels: Documentation,Translation,github-actions
|