From 3ce7c5231d6614ffbe08211480e0e2a9d61f7520 Mon Sep 17 00:00:00 2001 From: Thomas Deinhamer Date: Sat, 23 Nov 2024 15:12:35 +0100 Subject: [PATCH] Add workflow configuration --- .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