ArchiSteamFarm/.github/workflows/translations.yml

86 lines
2.2 KiB
YAML
Raw Normal View History

name: ASF-translations
on:
schedule:
2021-06-04 10:46:24 +00:00
- cron: '55 1 * * *'
jobs:
update:
2021-01-02 14:13:33 +00:00
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
with:
2023-09-04 17:19:48 +00:00
show-progress: false
submodules: recursive
2021-07-08 08:48:01 +00:00
token: ${{ secrets.ARCHIBOT_GITHUB_TOKEN }}
2020-08-03 21:39:56 +00:00
- name: Reset wiki to follow origin
shell: sh
run: |
set -eu
cd wiki
git fetch --depth=1 origin master
git reset --hard origin/master
2020-08-03 21:39:56 +00:00
- name: Download latest translations from Crowdin
uses: crowdin/github-action@v1.14.1
with:
upload_sources: false
download_translations: true
skip_untranslated_strings: true
push_translations: false
2021-01-20 20:14:45 +00:00
crowdin_branch_name: main
2021-05-09 11:40:00 +00:00
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@v6.0.0
with:
gpg_private_key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit the changes to wiki
shell: sh
run: |
set -eu
2020-08-03 21:06:18 +00:00
cd wiki
git add -A "locale"
if ! git diff --cached --quiet; then
git commit -m "Automatic translations update"
fi
2020-08-03 21:39:56 +00:00
- name: Push changes to wiki
uses: ad-m/github-push-action@v0.8.0
with:
2021-07-06 08:00:00 +00:00
github_token: ${{ secrets.ARCHIBOT_GITHUB_TOKEN }}
branch: master
2021-01-03 10:36:02 +00:00
directory: wiki
2020-08-03 22:47:26 +00:00
repository: ${{ github.repository }}.wiki
- name: Commit 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"
fi
2020-08-03 21:39:56 +00:00
- name: Push changes to ASF
uses: ad-m/github-push-action@v0.8.0
with:
2021-07-06 08:00:00 +00:00
github_token: ${{ secrets.ARCHIBOT_GITHUB_TOKEN }}
2021-01-03 10:36:02 +00:00
branch: ${{ github.ref }}