ci: harden release verification and governance #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ValidatePrTitle | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize, reopened] | |
| permissions: | |
| pull-requests: read | |
| jobs: | |
| ValidatePrTitle: | |
| name: ValidatePrTitle | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - name: Validate pull request title | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: | | |
| title="${PR_TITLE}" | |
| if [ -z "${title// /}" ]; then | |
| echo "PR title cannot be empty." | |
| exit 1 | |
| fi | |
| if [[ "$title" =~ ^[Ww][Ii][Pp]([:\ ]|$) ]]; then | |
| echo "PR title cannot start with WIP." | |
| exit 1 | |
| fi | |
| echo "PR title is valid: $title" |