test beta diff #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Monitor Localisation File Changes | |
| on: | |
| push: | |
| branches: | |
| - beta | |
| - devGuideTranslatingSyms | |
| paths: | |
| - 'source/locale/en/*.dic' | |
| jobs: | |
| send_email: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get the diff | |
| id: git_diff | |
| run: | | |
| git fetch origin | |
| # Get the diff from the push | |
| # Get only the changed lines from the diff | |
| DIFF="$(git diff -U0 master beta -- source/locale/en/*.dic | grep '^[+-]')" | |
| DOUBLE_SPACED_DIFF=$(echo "$DIFF" | sed G) | |
| # Store diff in multi-line environment variable | |
| echo "DIFF<<EOF"$'\n'"$DIFF"$'\n'EOF >> $GITHUB_OUTPUT | |
| echo "DOUBLE_SPACED_DIFF<<EOF"$'\n'"$DOUBLE_SPACED_DIFF"$'\n'EOF >> $GITHUB_OUTPUT | |
| - name: Send email | |
| uses: dawidd6/action-send-mail@v4 | |
| with: | |
| server_address: email-smtp.us-west-2.amazonaws.com | |
| server_port: 465 | |
| username: ${{ secrets.EMAIL_USERNAME }} | |
| password: ${{ secrets.EMAIL_PASSWORD }} | |
| subject: "Changes detected in localisation files" | |
| to: [email protected] # [email protected] | |
| from: '"NVDA localisations" <[email protected]>' | |
| convert_markdown: true | |
| body: | | |
| The following changes have been detected in the English symbols or character descriptions dictionaries: | |
| ${{ steps.git_diff.outputs.DOUBLE_SPACED_DIFF }} | |
| Please review and update the translated files as necessary. | |
| For more information, review the guide on translating these files: https://github.com/nvaccess/nvda/blob/master/projectDocs/translating/github.md. | |
| html_body: | | |
| The following changes have been detected in the English symbols or character descriptions dictionaries: | |
| ``` | |
| ${{ steps.git_diff.outputs.DIFF }} | |
| ``` | |
| Please review and update the translated files as necessary. | |
| For more information, [review the guide on translating these files](https://github.com/nvaccess/nvda/blob/master/projectDocs/translating/github.md). |