Files
ArchiSteamFarm/.github/workflows/translations.yml
Archi 2f7478b968 CI: Pin versions
While floating tags are nice to use and fancy, we already had situations where the fixed source code did not result in the same deterministic build as the one built e.g. a week ago due to non-pinned versions that resulted in a different set of dependencies than originally.

Since GitHub actions follow similar pattern, we want to do our best to ensure that if CI in given fixed version passed on a fixed source, then it should also result in the same deterministic output. Of course this is impossible to achieve in 100% (e.g. resources no longer being available over the network), but this is something we can do.

It wasn't like that before renovate since we didn't have a standarized bot that could handle bumping those versions for us.
2021-06-30 16:19:41 +02:00

91 lines
2.2 KiB
YAML

name: ASF-translations
on:
schedule:
- cron: '55 1 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2.3.4
with:
submodules: recursive
- name: Reset wiki to follow origin
shell: sh
run: |
set -eu
cd wiki
git fetch --depth=1 origin master
git reset --hard origin/master
- name: Download latest translations from Crowdin
uses: crowdin/github-action@1.1.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 wiki
uses: crazy-max/ghaction-import-gpg@v3.1.0
with:
gpg-private-key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
git-user-signingkey: true
git-commit-gpgsign: true
workdir: wiki
- name: Commit the changes to wiki
shell: sh
run: |
set -eu
cd wiki
git add -A "locale"
if ! git diff --cached --quiet; then
git commit -m "Automatic translations update"
fi
- name: Push changes to wiki
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
directory: wiki
repository: ${{ github.repository }}.wiki
- name: Import GPG key for ASF
uses: crazy-max/ghaction-import-gpg@v3.1.0
with:
gpg-private-key: ${{ secrets.ARCHIBOT_GPG_PRIVATE_KEY }}
git-user-signingkey: true
git-commit-gpgsign: true
- name: Commit the changes to ASF
shell: sh
run: |
set -eu
git add -A "ArchiSteamFarm/Localization" "ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/Localization" "wiki"
if ! git diff --cached --quiet; then
git commit -m "Automatic translations update"
fi
- name: Push changes to ASF
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}