mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-15 22:10:30 +00:00
79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
name: ASF-translations
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '55 1 * * *'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
update:
|
|
environment: dev-crowdin
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
with:
|
|
show-progress: false
|
|
submodules: recursive
|
|
token: ${{ secrets.ARCHIBOT_GITHUB_TOKEN }}
|
|
|
|
- name: Reset wiki to follow origin
|
|
shell: sh
|
|
working-directory: wiki
|
|
run: |
|
|
set -eu
|
|
|
|
git fetch origin master
|
|
git reset --hard origin/master
|
|
|
|
- name: Download latest translations from Crowdin
|
|
uses: crowdin/github-action@60debf382ee245b21794321190ad0501db89d8c1 # v2.13.0
|
|
with:
|
|
upload_sources: false
|
|
download_translations: true
|
|
skip_untranslated_strings: true
|
|
push_translations: false
|
|
crowdin_branch_name: main
|
|
config: '.github/crowdin.yml'
|
|
project_id: ${{ secrets.ASF_CROWDIN_PROJECT_ID }}
|
|
token: ${{ secrets.ASF_CROWDIN_API_TOKEN }}
|
|
|
|
- name: Import GPG key for signing
|
|
uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0
|
|
with:
|
|
gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
|
|
git_config_global: true
|
|
git_user_signingkey: true
|
|
git_commit_gpgsign: true
|
|
|
|
- name: Commit and push the changes to wiki
|
|
shell: sh
|
|
working-directory: wiki
|
|
run: |
|
|
set -eu
|
|
|
|
git add -A "locale"
|
|
|
|
if ! git diff --cached --quiet; then
|
|
git commit -m "Automatic translations update"
|
|
|
|
git push origin HEAD:master
|
|
fi
|
|
|
|
- name: Commit and push the changes to ASF
|
|
shell: sh
|
|
run: |
|
|
set -eu
|
|
|
|
git add -A "ArchiSteamFarm/Localization" "ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Localization" "ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Localization" "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Localization" "wiki"
|
|
|
|
if ! git diff --cached --quiet; then
|
|
git commit -m "Automatic translations update"
|
|
|
|
git push
|
|
fi
|