Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Crowdin Contributors Action #1457

Crowdin Contributors Action

Crowdin Contributors Action #1457

name: Crowdin Contributors Action
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch: {}
env:
CONTRIBUTORS_JSON_FILENAME: crowdin-contributors
jobs:
crowdin-contributors:
runs-on: ubuntu-latest
if: github.repository == 'AndroidIDEOfficial/AndroidIDE'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate Crowdin Contributors table
id: generate_table
uses: andrii-bodnar/[email protected]
continue-on-error: false
with:
contributors_per_line: 8
max_contributors: 32
image_size: 64
min_words_contributed: 100
files: CROWDIN_CONTRIBUTORS.md
crowdin_project_link: "https://crowdin.com/project/androidide"
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Write JSON report
uses: "DamianReeves/write-file-action@master"
with:
path: ${{ env.CONTRIBUTORS_JSON_FILENAME }}_staging.json
write-mode: overwrite
contents: ${{ steps.generate_table.outputs.json_report }}
- name: Pretty-print JSON report
run: |
sudo apt-get install jq
cat ${{ env.CONTRIBUTORS_JSON_FILENAME }}_staging.json | jq '.' > ${{ env.CONTRIBUTORS_JSON_FILENAME }}.json
rm ${{ env.CONTRIBUTORS_JSON_FILENAME }}_staging.json
- name: Upload JSON report
uses: actions/upload-artifact@v4
with:
name: crowdin-contributors-json
path: ${{ env.CONTRIBUTORS_JSON_FILENAME }}.json
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: Update Crowdin Contributors table
body: By [action-crowdin-contributors](https://github.com/andrii-bodnar/action-crowdin-contributors) GitHub action
commit-message: "chore: update crowdin contributors table"
committer: Crowdin Bot <[email protected]>
branch: crowdin-contributors/patch