Files
Gearslip/.github/workflows/translations.yml
T
Seb3thehacker 8e1df8dc34 A site's icon is only ever saved inside the icons folder, and the translations check runs with no token
Fixes the code scanning alerts: a host made of dots got through the file name filter, and
the workflow didn't say it needs no permissions.
2026-11-11 13:24:34 -08:00

24 lines
1008 B
YAML

name: Translations
# Weblate is the only thing that writes translated strings: it pushes straight to experimental,
# never through a pull request. A PR that edits them collides with Weblate's own copy, and
# Weblate locks itself until someone resets it. Edit the English strings.xml only.
# Weblate's own pull requests are the exception: they are the translations.
on:
pull_request:
paths:
- "gearslip/src/main/res/values-*/strings.xml"
# It only reads the pull request's own details from the event, so it needs no token at all.
permissions: {}
jobs:
weblate-only:
if: github.event.pull_request.user.login != 'weblate'
runs-on: ubuntu-latest
steps:
- name: Translations go through Weblate
run: |
echo "::error::This pull request edits a translation. Please make translation changes on Weblate instead: https://hosted.weblate.org/engage/gearslip/ (it can upload a whole strings.xml under Files > Upload translation). See CONTRIBUTING.md."
exit 1