1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-10 23:30:57 +00:00
starship/.github/workflows/format-workflow.yml
Thomas O'Donnell 31ab8aa0c5
ci: Fix failing CI jobs (#3481)
Have updated the workflow to only run the "Block Translated Changes" job
on PRs since it will fail when run on pushes to a branch. Have fixed the
formatting while I was here.
2022-01-21 11:19:56 -06:00

32 lines
960 B
YAML

---
name: Format + Docs Workflow
on:
push:
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
pull_request:
paths: ["docs/**", "**.md", "**.toml", "**.js", "**.json", "**.ts"]
jobs:
# Run the dprint code formatter for documentation
dprint:
name: Dprint [Docs Formatter]
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v2.4.0
- name: Docs | Format
uses: dprint/check@v2.0
# If this is not a Crowdin PR, block changes to translated documentation
block-crowdin:
name: Block Translated Changes
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Prevent File Change
uses: xalvarez/prevent-file-change-action@v1.2.0
if: ${{ env.GITHUB_HEAD_REF != 'i18n_master' }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
pattern: docs/[a-z][a-z][a-z]?-[A-Z][A-Z]?/.*