Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 27e1dc7

Browse files
committed
Find changed po files.
1 parent 24e1b97 commit 27e1dc7

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/tests.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,18 @@ jobs:
2222
id: changed_files
2323
with:
2424
token: ${{ secrets.GITHUB_TOKEN }}
25-
- name: Show changed files
26-
run:
27-
echo '${{ join(fromJSON(steps.changed_files.outputs.all), '\n') }}'
28-
# - name: Install pospell
29-
# run: |
30-
# sudo apt-get update
31-
# sudo apt-get install -y hunspell hunspell-fr-comprehensive
32-
# sudo python3 -m pip install pospell
33-
# - name: Run pospell
34-
# run: pospell -p dict -l fr_FR *.po */*.po
25+
- name: Install pospell
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y hunspell hunspell-fr-comprehensive
29+
sudo python3 -m pip install pospell
30+
- name: Run pospell
31+
with:
32+
ADDED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.added), ' ') }}
33+
MODIFIED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.modified), ' ') }}
34+
run: |
35+
CHANGED_PO_FILES=$(printf "%s %s\n" "$ADDED_FILES" "$MODIFIED_FILES" | tr ' ' '\n' | grep '.po$')
36+
[ -n "$CHANGED_PO_FILES" ] && pospell -p dict -l fr_FR $CHANGED_PO_FILES
3537
3638
# powrap:
3739
# name: 'Longueur des lignes (powrap)'

0 commit comments

Comments
 (0)