-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (46 loc) · 1.46 KB
/
validate-pullrequest.yaml
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
46
47
48
49
50
name: Validate and label Pull Request
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
getChangedChart:
if: ${{ !startsWith(github.head_ref, 'release-please--') }}
uses: ./.github/workflows/get-changed-chart.yaml
validateCommits:
if: ${{ !startsWith(github.head_ref, 'release-please--') }}
name: Validate commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Conventional commit check
uses: cocogitto/cocogitto-action@v3
validateAndLabelPR:
if: ${{ !startsWith(github.head_ref, 'release-please--') }}
name: Validate and label PR
runs-on: ubuntu-latest
needs: getChangedChart
env:
CT_TARGET_BRANCH: ${{ github.event.repository.default_branch }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: helm/[email protected]
- name: Conventional commit check
uses: cocogitto/cocogitto-action@v3
with:
check: false
- run: .github/scripts/validate-pullrequest.sh
env:
PR_TITLE: ${{ github.event.pull_request.title }}
GITHUB_TOKEN: ${{ github.token }}
ISSUE_NUMBER: ${{ github.event.number }}
CHANGED_CHART: ${{ needs.getChangedChart.outputs.chart }}