From 06bb33800e3043d537827189e42ab5721f41dd2c Mon Sep 17 00:00:00 2001 From: Thomas Deinhamer <184284+thasmo@users.noreply.github.com> Date: Sat, 23 Nov 2024 15:20:20 +0100 Subject: [PATCH] Add workflow configuration (#97) --- .github/workflows/{check.yaml => source.yaml} | 8 +++-- .github/workflows/title.yaml | 30 +++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) rename .github/workflows/{check.yaml => source.yaml} (87%) create mode 100644 .github/workflows/title.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/source.yaml similarity index 87% rename from .github/workflows/check.yaml rename to .github/workflows/source.yaml index e3dd9e1..00821d6 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/source.yaml @@ -1,13 +1,15 @@ -name: CHECK +name: SOURCE on: + merge_group: pull_request: push: branches: - main jobs: - install: + lint: + name: lint source runs-on: ubuntu-latest steps: - name: checkout repository @@ -26,5 +28,5 @@ jobs: node-version-file: '.nvmrc' - name: install dependencies run: pnpm install - - name: lint codebase + - name: lint source run: pnpm lint diff --git a/.github/workflows/title.yaml b/.github/workflows/title.yaml new file mode 100644 index 0000000..c6deac3 --- /dev/null +++ b/.github/workflows/title.yaml @@ -0,0 +1,30 @@ +name: TITLE + +on: + merge_group: + pull_request: + types: [opened, reopened, edited, synchronize] + +jobs: + lint: + name: lint title + runs-on: ubuntu-latest + steps: + - name: checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: setup package manager + uses: pnpm/action-setup@v4 + with: + run_install: false + - name: install node + uses: actions/setup-node@v4 + with: + cache: 'pnpm' + check-latest: true + node-version-file: '.nvmrc' + - name: install dependencies + run: pnpm install + - name: lint title + run: echo "${{ github.event.pull_request.title }}" | pnpm exec commitlint --extends @somehow-digital/commitlint-config/conventional