From 9baa374b743fe9c4a4b098f1e5ab518aa5ae4b6d Mon Sep 17 00:00:00 2001 From: Pavel Borisov <37436896+PavelSBorisov@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:42:56 +0200 Subject: [PATCH] ci: add pr title check workflow to ensure conventional commits (#2694) * ci: add pr title check workflow to ensure conventional commits Signed-off-by: PavelSBorisov * ci: rename pr check workflow and job titles Signed-off-by: PavelSBorisov --------- Signed-off-by: PavelSBorisov Co-authored-by: ivaylonikolov7 Co-authored-by: ivaylogarnev --- .github/workflows/pr_check.yml | 38 ++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/pr_check.yml diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml new file mode 100644 index 000000000..c1b07be2b --- /dev/null +++ b/.github/workflows/pr_check.yml @@ -0,0 +1,38 @@ +name: 'PR Formatting' +on: + workflow_dispatch: + pull_request: + types: + - opened + - reopened + - edited + - synchronize + +defaults: + run: + shell: bash + +permissions: + contents: read + +concurrency: + group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + title-check: + name: Title Check + runs-on: client-sdk-linux-medium + if: ${{ !github.event.pull_request.base.repo.fork }} + permissions: + statuses: write + steps: + - name: Harden Runner + uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 + with: + egress-policy: audit + + - name: Check PR Title + uses: step-security/conventional-pr-title-action@19fb561b33015fd2184055a05ce5a3bcf2ba3f54 # v3.2.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}