diff --git a/.github/workflows/pr-title-checker.yaml b/.github/workflows/pr-title-checker.yaml new file mode 100644 index 0000000..f137646 --- /dev/null +++ b/.github/workflows/pr-title-checker.yaml @@ -0,0 +1,32 @@ +name: Test naming convention +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + pull_request: + branches: [ master ] + types: [opened, synchronize, reopened, edited] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + pr_title_check: + name: Naming Convention + runs-on: infra-runner + timeout-minutes: 15 + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + - name: Get composite steps run repo + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + repository: tokenio/composite-actions + ref: master + path: .github/composite-actions + ssh-key: ${{ secrets.GIT_SSH_KEY }} + - name: Check if the PR title and the branch name is valid + uses: ./.github/composite-actions/commit-sanity/pr-title-checker