Skip to content

Commit 4430733

Browse files
authored
ci: add release notes and conventional pr titles (#13)
1 parent 36b6bd1 commit 4430733

File tree

6 files changed

+69
-16
lines changed

6 files changed

+69
-16
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,24 @@
22
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
33
version: 2
44
updates:
5-
# Maintain dependencies for Go modules
65
- package-ecosystem: "gomod"
76
directory: "/"
87
schedule:
9-
# Check for updates to Go modules every weekday
108
interval: "daily"
9+
commit-message:
10+
prefix: "chore"
11+
include: "scope"
1112
- package-ecosystem: "gomod"
1213
directory: "/tools"
1314
schedule:
1415
interval: "daily"
16+
commit-message:
17+
prefix: "chore"
18+
include: "scope"
1519
- package-ecosystem: "github-actions"
1620
directory: "/"
1721
schedule:
1822
interval: "daily"
23+
commit-message:
24+
prefix: "chore"
25+
include: "scope"

.github/workflows/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
name: Test
11+
uses: ./.github/workflows/test.yml

.github/workflows/pr.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- edited
10+
branches:
11+
- main
12+
13+
jobs:
14+
validate-pr-title:
15+
name: Validate PR Title
16+
runs-on: ubuntu-latest
17+
permissions:
18+
pull-requests: write
19+
steps:
20+
- name: PR Conventional Commit Validation
21+
uses: ytanikin/[email protected]
22+
with:
23+
task_types: '["feat","fix","docs","test","refactor","ci","perf","chore","revert"]'
24+
add_scope_label: 'true'
25+
custom_labels: '{"feat": "feature", "fix": "fix", "docs": "documentation", "test": "test", "refactor": "refactor", "ci": "CI/CD", "perf": "performance", "chore": "chore", "revert": "revert"}'
26+
27+
test:
28+
name: Test
29+
uses: ./.github/workflows/test.yml

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ permissions:
1515

1616
jobs:
1717
test:
18+
name: Test
1819
uses: ./.github/workflows/test.yml
1920

2021
release:
21-
needs: test
22+
name: Release
2223
runs-on: ubuntu-latest
24+
needs: test
2325
steps:
2426
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2527
with:

.github/workflows/test.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
name: Tests
33

44
on:
5-
pull_request:
6-
paths-ignore:
7-
- 'README.md'
8-
push:
9-
branches:
10-
- main
11-
tags-ignore:
12-
- 'v*'
13-
paths-ignore:
14-
- 'README.md'
155
workflow_call:
166

177
permissions:
@@ -36,7 +26,7 @@ jobs:
3626
version: latest
3727

3828
generate:
39-
name: Check documentation
29+
name: Check Documentation
4030
runs-on: ubuntu-latest
4131
steps:
4232
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -56,8 +46,8 @@ jobs:
5646
5747
test:
5848
name: Terraform Provider Acceptance Tests
59-
needs: build
6049
runs-on: ubuntu-latest
50+
needs: build
6151
timeout-minutes: 15
6252
strategy:
6353
fail-fast: false
@@ -85,3 +75,17 @@ jobs:
8575
timeout-minutes: 10
8676
- name: Clean up
8777
run: docker stop openfga && docker rm openfga
78+
79+
check:
80+
name: All Tests Succeeded
81+
runs-on: ubuntu-latest
82+
if: always()
83+
needs:
84+
- build
85+
- generate
86+
- test
87+
steps:
88+
- name: Decide whether the needed jobs succeeded or failed
89+
uses: re-actors/alls-green@release/v1
90+
with:
91+
jobs: ${{ toJSON(needs) }}

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ release:
5959
# If you want to manually examine the release before its live, uncomment this line:
6060
# draft: true
6161
changelog:
62-
disable: true
62+
use: github-native
6363
git:
6464
prerelease_suffix: "-pre"

0 commit comments

Comments
 (0)