You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: conventional-commits/README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,13 @@
1
1
# 📝 Conventional Commits Workflow
2
2
3
3
## 🔍 Overview
4
+
4
5
This reusable GitHub Actions workflow validates that pull request titles follow the [Conventional Commits](https://www.conventionalcommits.org/) specification. Conventional Commits provide a standardized format for commit messages, making it easier to generate changelogs, automate versioning, and understand the purpose of changes at a glance. By enforcing this standard, your repository maintains a clean and meaningful history that benefits both developers and automated tools.
5
6
6
7
## 📚 What are Conventional Commits?
8
+
7
9
Conventional Commits follow this structured format:
10
+
8
11
```
9
12
<type>[optional scope]: <description>
10
13
@@ -14,6 +17,7 @@ Conventional Commits follow this structured format:
14
17
```
15
18
16
19
### 🏷️ Common Types Include:
20
+
17
21
-`✨ feat`: A new feature that adds functionality to your codebase
18
22
-`🐛 fix`: A bug fix that resolves an issue or problem
19
23
-`📖 docs`: Documentation changes or improvements
@@ -25,6 +29,7 @@ Conventional Commits follow this structured format:
25
29
-`🔒 security`: Fixing security vulnerabilities or enhancing security
26
30
27
31
## 🌟 Benefits
32
+
28
33
-**📋 Automated Changelog Generation**: Works seamlessly with tools like release-please to create detailed, organized changelogs without manual effort
29
34
-**🔢 Semantic Versioning Automation**: Helps determine version bumps based on commit types (major, minor, patch) following SemVer principles
30
35
-**📊 Improved Repository History**: Makes your project history more readable, structured, and navigable for all team members
@@ -37,10 +42,11 @@ Conventional Commits follow this structured format:
37
42
### 🔐 Secrets
38
43
39
44
| Name | Description | Required |
40
-
|------|-------------|----------|
45
+
|---|---|---|
41
46
|`GITHUB_TOKEN`| GitHub token for authentication and PR interactions | Yes |
42
47
43
48
### 🛡️ Permissions
49
+
44
50
The workflow requires `pull-requests: read` permission to access PR information and validate titles effectively.
45
51
46
52
## 💻 Example Usage
@@ -63,13 +69,15 @@ jobs:
63
69
```
64
70
65
71
## 📋 Implementation Notes
72
+
66
73
- 🔄 The workflow runs automatically when PRs are opened, edited, or reopened to ensure continuous validation
67
74
- ✅ It validates the PR title against the Conventional Commits specification with comprehensive checks
68
75
- 💬 If validation fails, the workflow writes detailed guidance on how to fix the title to the job summary
69
76
- 🔗 This workflow is particularly useful when combined with the release-please workflow for a fully automated release process
70
77
- 🚀 Helps maintain a high-quality repository that's ready for automated versioning and changelog generation
71
78
72
79
## 🛠️ Troubleshooting
80
+
73
81
- If PR titles are consistently failing validation, consider providing team training on Conventional Commits
74
82
- For complex projects, you may want to define custom scopes that align with your project's architecture
75
83
- Remember that only the PR title needs to follow the convention, not every commit message (though that's also beneficial)
> Requires a Docker Build Cloud subscription and a builder configured in your DockerHub organization. The DockerHub PAT must have the **Build** scope to authenticate to the cloud endpoint.
> [!IMPORTANT] Requires a Docker Build Cloud subscription and a builder configured in your DockerHub organization. The DockerHub PAT must have the **Build** scope to authenticate to the cloud endpoint.
16
+
17
+
## ⚙️ Inputs
18
+
19
+
| Name | Description | Required | Default |
20
+
| --- | --- | --- | --- |
21
+
|`attest`| Generate & sign a keyless SLSA build provenance attestation for the pushed image (requires caller permissions, see notes) | No |`false`|
22
+
|`build-args`| Docker build arguments (multiline format: `KEY1=value1\nKEY2=value2`) | No |`""`|
0 commit comments