From 29383d49d409e11063b5ceb27811cd2a2eae94c2 Mon Sep 17 00:00:00 2001 From: Toby Date: Wed, 15 May 2024 10:15:22 +0000 Subject: [PATCH] Add formatting as workflow (and pray it works as intended) --- .github/workflows/formatting.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/formatting.yml diff --git a/.github/workflows/formatting.yml b/.github/workflows/formatting.yml new file mode 100644 index 000000000..9a58be8e8 --- /dev/null +++ b/.github/workflows/formatting.yml @@ -0,0 +1,19 @@ +name: 'File Formatting with Prettier' + +on: + push: + branches: + - main + schedule: + - cron: '00 8 * * *' + +jobs: + format: + if: github.repository == 'is-a-dev/register' + runs-on: ubuntu-latest + permissions: [read-all, write-all] + steps: + run: npx prettier domains/* --check + if github.working-directory == 'domains/': + run: npx prettier domains/* --write +