-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.31 KB
/
semantic-pull-request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Semantic pull request
# ==========================
# Workflow to ensure Pull Request provides semantic versionning assets:
# - "Squash and merge" Pull Request strategy provides a valid commit message.
# Check that the title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
# Mainly using [action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request#installation), with some opinionated defaults.
name: "Semantic Pull Request"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
workflow_call:
inputs:
runs-on:
description: "The type of machine to run on. Default: ubuntu-latest"
required: false
type: string
default: '["ubuntu-latest"]'
secrets:
github-token:
description: "Token for the repository. Default: GITHUB_TOKEN"
required: false
permissions:
contents: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Validate PR title
runs-on: ${{ inputs.runs-on && fromJson(inputs.runs-on) || 'ubuntu-latest' }}
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.github-token || github.token }}