1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- name: Update translations
- on:
- push:
- branches:
- - translations
- paths:
- - 'i18n/*.json'
- jobs:
- translations:
- runs-on: ubuntu-latest
- steps:
- - name: Load Repository
- uses: actions/checkout@v2
- with:
- token: ${{ secrets.WIKIBOT_TOKEN }}
- - name: Update Widgets
- run: |
- sudo apt-get install inkscape
- for language in i18n/*.json
- do
- language=$(basename $language .json)
- if [[ "$language" =~ [^[:lower:]-] ]]
- then
- echo "$language" is not a translation
- else
- wget https://translate.wikibot.de/widgets/wiki-bot/$language/discord/svg-badge.svg
- convert -background none svg-badge.svg i18n/widgets/$language.png
- rm svg-badge.svg
- fi
- done
- - name: Commit changes
- uses: EndBug/add-and-commit@v4
- with:
- author_name: WikiBot-bot
- author_email: 69196528+WikiBot-bot@users.noreply.github.com
- message: "Update translation widgets"
- add: "i18n/widgets/*.png"
- - name: Create Pull Request
- uses: repo-sync/pull-request@v2
- with:
- pr_title: "Update translations"
- pr_body: "Update translations from https://translate.wikibot.de/engage/wiki-bot/"
- pr_label: "translation"
- github_token: ${{ secrets.WIKIBOT_TOKEN }}
|