diff --git a/.github/workflows/branch-check.yml b/.github/workflows/branch-check.yml new file mode 100644 index 0000000..99af019 --- /dev/null +++ b/.github/workflows/branch-check.yml @@ -0,0 +1,12 @@ +name: "BRANCH NAME CONVENTION CHECK" +on: [push] +jobs: + check-branch-name: + runs-on: ubuntu-latest + steps: + - name: Check branch name + run: | + if [[ ! "$GITHUB_REF" =~ refs/heads/(feature|hotfix|bugfix)/.+ ]]; then + echo "Branch name does not follow the 'feature/*', 'hotfix/*', 'bugfix/*' naming convention." + exit 1 + fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 55c4f0d..d116936 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,9 +3,17 @@ name: Linter Check on: pull_request: branches: + - main - feature/** - bugfix/** - hotfix/** + push: + branches: + - main + - feature/** + - bugfix/** + - hotfix/** + permissions: contents: read @@ -26,4 +34,4 @@ jobs: uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # golangci-lint-action v4.0.0 with: version: latest - config: .golangci.yml + args: --config .golangci.yml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1a44d34..49556ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Our project adheres to the GitFlow workflow to enhance development and release m - **feature/***: For maining new features or enhancements, e.g., `feature/add-login`. - **release/***: Manages pre-release activities and final testing, adhering to [Semantic Versioning (semver)](https://semver.org/ "Semantic Versioning 2.0.0"). - **hotfix/***: Addresses critical issues in production, e.g., `hotfix/login-issue`. - +- **bugfix/***: Addresses minor issues in production like typo, non-critical errors etc. ### Workflow Overview #### Setting Up for Development