From c74c359e42692ca0dd68062abe54c79033ce8295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 26 Feb 2024 15:28:30 +0100 Subject: [PATCH] Improve workflows for localization --- .github/workflows/check_links.yml | 7 ++++--- .github/workflows/fix_translations.yml | 5 +++-- .github/workflows/typos.yml | 6 +++--- .github/workflows/vale.yml | 5 +++-- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check_links.yml b/.github/workflows/check_links.yml index 5298c715e..caf5febac 100644 --- a/.github/workflows/check_links.yml +++ b/.github/workflows/check_links.yml @@ -1,7 +1,8 @@ name: Check broken links on: push: - branches: ["main"] + branches: + - main pull_request: workflow_dispatch: jobs: @@ -25,7 +26,7 @@ jobs: env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: - args: --max-redirects 10 --exclude-mail --base ${{ steps.waitForVercel.outputs.url }} './src/content/docs/**/*.mdx' + args: --max-redirects 10 --base ${{ steps.waitForVercel.outputs.url }} './src/content/docs/**/*.mdx' fail: true check-live-links: runs-on: ubuntu-22.04 @@ -37,7 +38,7 @@ jobs: env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} with: - args: --max-redirects 10 --exclude-mail --base https://dev.adjust.com './src/content/docs/en/**/*.mdx' + args: --max-redirects 10 --base https://dev.adjust.com './src/content/docs/en/**/*.mdx' fail: true - name: Create issue to fix broken links # Don't run this step for pull requests. We don't want to generate an issue every time! diff --git a/.github/workflows/fix_translations.yml b/.github/workflows/fix_translations.yml index 46bac4f5f..f9d04edd2 100644 --- a/.github/workflows/fix_translations.yml +++ b/.github/workflows/fix_translations.yml @@ -6,6 +6,7 @@ jobs: i18n-fixes: name: Fix translated files runs-on: ubuntu-latest + if: startsWith(github.head_ref, 'smartling') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -21,7 +22,7 @@ jobs: - name: Commit changes if: steps.git-check.outputs.modified == 'true' run: | - git config --global user.name github-actions - git config --global user.email github-actions@github.com + git config --global user.name "adjust-pc-team" + git config --global user.email "153073226+adjust-pc-team@users.noreply.github.com" git commit -am "Fix translated files" git push diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml index e19897791..2444e3241 100644 --- a/.github/workflows/typos.yml +++ b/.github/workflows/typos.yml @@ -1,14 +1,14 @@ name: Check for typos -on: [pull_request] - +on: + pull_request: jobs: typos: name: Spell Check with Typos runs-on: ubuntu-latest + if: startsWith(github.head_ref, 'smartling') == false steps: - name: Checkout Actions Repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - name: Check for typos uses: crate-ci/typos@master with: diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index bc1643368..7a30c54ff 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -1,10 +1,11 @@ name: Style guide check -on: [pull_request] - +on: + pull_request: jobs: vale: name: Run Vale runs-on: ubuntu-latest + if: startsWith(github.head_ref, 'smartling') == false steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - uses: errata-ai/vale-action@reviewdog