File tree Expand file tree Collapse file tree 2 files changed +25
-19
lines changed Expand file tree Collapse file tree 2 files changed +25
-19
lines changed Original file line number Diff line number Diff line change 1+ name : Validate Commit Message
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, edited]
6+
7+ jobs :
8+
9+ validate :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v3
14+ with :
15+ fetch-depth : 0
16+
17+ - name : Validate Tag
18+ run : |
19+ TAG=$(echo ${{ github.event.pull_request.title }} | sed -ne 's/\[\(.*\)\].*/\1/p')
20+ if grep -q "tag: \"\[$TAG\]\"" .codegen/changelog_config.yml; then
21+ echo "Valid tag found: [$TAG]"
22+ else
23+ echo "Invalid or missing tag in commit message: [$TAG]"
24+ exit 1
25+ fi
Original file line number Diff line number Diff line change 3939
4040 - name : Fail on differences
4141 run : git diff --exit-code
42-
43- commit-message :
44- runs-on : ubuntu-latest
45- if : ${{ github.event_name == 'pull_request' }}
46- steps :
47- - name : Checkout
48- uses : actions/checkout@v3
49- with :
50- fetch-depth : 0
51-
52- - name : Validate Tag
53- run : |
54- TAG=$(echo ${{ github.event.pull_request.title }} | sed -ne 's/\[\(.*\)\].*/\1/p')
55- if grep -q "tag: \"\[$TAG\]\"" .codegen/changelog_config.yml; then
56- echo "Valid tag found: [$TAG]"
57- else
58- echo "Invalid or missing tag in commit message: [$TAG]"
59- exit 1
60- fi
You can’t perform that action at this time.
0 commit comments