From 89721a14d72e56d3f774e3e33dfad18040c6b648 Mon Sep 17 00:00:00 2001 From: Simon Hyll Date: Fri, 24 May 2024 01:05:12 +0200 Subject: [PATCH] feat: adding format checker for PRs --- .github/workflows/check.yml | 23 +++++++++++++++++++++++ .github/workflows/format.yml | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 000000000..7d1a93407 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,23 @@ +# Adapted from https://github.com/withastro/starlight/blob/main/.github/workflows/format.yml + +name: Format on PR + +on: + pull_request: + +jobs: + format: + runs-on: ubuntu-latest + steps: + - name: Check out code using Git + uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 9 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'pnpm' + - run: pnpm i + - name: Format with Prettier + run: pnpm format diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 150b11d50..49909a45e 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -19,7 +19,7 @@ jobs: token: ${{ secrets.ORG_TAURI_BOT_PAT }} - uses: pnpm/action-setup@v2 with: - version: 8 + version: 9 - uses: actions/setup-node@v3 with: node-version: 16