From cc9e61dbd07f76b1922be0db96a4eba7c63814ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Sun, 12 Sep 2021 21:07:46 +0200 Subject: [PATCH 1/3] Add workflows related to translation updates --- .../check-for-extended-ascii-and-utf-bom.yaml | 22 +++++++++++++ .github/workflows/checkForTranslations.yaml | 31 +++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/check-for-extended-ascii-and-utf-bom.yaml create mode 100644 .github/workflows/checkForTranslations.yaml diff --git a/.github/workflows/check-for-extended-ascii-and-utf-bom.yaml b/.github/workflows/check-for-extended-ascii-and-utf-bom.yaml new file mode 100644 index 0000000..645a8d7 --- /dev/null +++ b/.github/workflows/check-for-extended-ascii-and-utf-bom.yaml @@ -0,0 +1,22 @@ +# Created by Mesar Hameed (@mhameed) + +name: Check that we dont have extended ascii or utf boms in our files + +on: + pull_request: + +jobs: + extendedAsciiAndBom: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: check for files known to cause problems + run: find . -type f | grep -vP "^./.git" | xargs file | grep -iP "bom|extended|iso" + - name: + if: failure() + uses: unsplash/comment-on-pr@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + msg: "Please note that this pull request seems to contain files other than ascii or utf8 without bom." diff --git a/.github/workflows/checkForTranslations.yaml b/.github/workflows/checkForTranslations.yaml new file mode 100644 index 0000000..60453d9 --- /dev/null +++ b/.github/workflows/checkForTranslations.yaml @@ -0,0 +1,31 @@ +# https://crontab.guru/crontab.5.html + +name: Check for l10n updates + +on: + + workflow_dispatch: + + schedule: + # * is a special character in YAML so you have to quote this string + - cron: '1 * * * *' # Once every hour (minute 1) + +jobs: + update-translations: + runs-on: windows-latest + steps: + - name: Checkout main + uses: actions/checkout@v2 + + - name: Push changes + run: | + git config --global user.name github-actions + git config --global user.email github-actions@github.com + git remote add l10n https://github.com/nvdaaddons/addonName # Replace with the repo name, for example, clipContentsDesigner + git fetch l10n + git reset l10n/stable addon/doc addon/locale + git commit -m "Update translations" + git pull + git push + + \ No newline at end of file From 47f4a93d45a4a5374292851f8345d7e40ed3b399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Tue, 21 Sep 2021 11:24:35 +0200 Subject: [PATCH 2/3] Review actions --- .github/workflows/checkForTranslations.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/checkForTranslations.yaml b/.github/workflows/checkForTranslations.yaml index 60453d9..1121af9 100644 --- a/.github/workflows/checkForTranslations.yaml +++ b/.github/workflows/checkForTranslations.yaml @@ -21,11 +21,10 @@ jobs: run: | git config --global user.name github-actions git config --global user.email github-actions@github.com - git remote add l10n https://github.com/nvdaaddons/addonName # Replace with the repo name, for example, clipContentsDesigner + git remote add l10n https://github.com/nvdaaddons/${{ github.event.repository.name }} git fetch l10n git reset l10n/stable addon/doc addon/locale git commit -m "Update translations" git pull git push - \ No newline at end of file From c0314b979b52b983c5e9f71262317a752be6d638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noelia=20Ruiz=20Mart=C3=ADnez?= Date: Thu, 23 Sep 2021 06:28:59 +0200 Subject: [PATCH 3/3] Review action: add new line at the end of the workflow file --- .github/workflows/checkForTranslations.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checkForTranslations.yaml b/.github/workflows/checkForTranslations.yaml index 1121af9..e247619 100644 --- a/.github/workflows/checkForTranslations.yaml +++ b/.github/workflows/checkForTranslations.yaml @@ -27,4 +27,4 @@ jobs: git commit -m "Update translations" git pull git push - \ No newline at end of file +