name: ASF-translations on: schedule: - cron: '0 2 * * *' jobs: update: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 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.0.9 with: upload_sources: false download_translations: true skip_untranslated_strings: true push_translations: false crowdin_branch_name: main project_id: ${{ secrets.ASF_CROWDIN_PROJECT_ID }} token: ${{ secrets.ASF_CROWDIN_API_TOKEN }} env: GITHUB_TOKEN: 'not-used' # TODO: https://github.com/crowdin/github-action/pull/30 - name: Commit the changes to wiki shell: sh run: | set -eu cd wiki git config --local user.email "action@github.com" git config --local user.name "GitHub Action" 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@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: master directory: wiki repository: ${{ github.repository }}.wiki - name: Commit the changes to ASF shell: sh run: | set -eu git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git add -A "ArchiSteamFarm/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@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }}