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