wallabag/.github/workflows/translations.yml
naveensrinivasan 8446cda519
Set permissions for GitHub actions
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

 Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-04-16 01:58:38 +00:00

50 lines
1.3 KiB
YAML

name: "Translations"
on:
pull_request:
push:
branches:
- master
- 2.*
permissions:
contents: read
jobs:
translations:
name: "Translations"
runs-on: "ubuntu-20.04"
strategy:
matrix:
php:
- "7.4"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php }}"
tools: pecl, composer:2.2
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
composer-options: "--optimize-autoloader --prefer-dist"
- name: "Validate Core translations"
run: "php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v"
- name: "Validate CraueConfig translations"
run: "php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v"
- name: "Validate User translations"
run: "php bin/console lint:yaml src/Wallabag/UserBundle/Resources/translations -v"