Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: commitizen ci actions #92

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/commit-message.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Lint PR Commit Messages"

on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
branches:
- dev
- main

jobs:
commit-lint:
name: Conventional Commit PR commit messages
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v5.1.1
with:
python-version: 3.11

- name: Create uv virtualenv
run: |
python -m pip install uv
uv venv .venv
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Install dependencies
run: uv pip install commitizen

- name: Check commit messages
run: |
cz check \
--rev-range ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} \
--allowed-prefixes 'Merge' 'Revert' 'Pull request' 'fixup!' 'squash!'
jarvis8x7b marked this conversation as resolved.
Show resolved Hide resolved
1 change: 0 additions & 1 deletion .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- dev
- staging
- main
- simulator

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
types: [opened, reopened, ready_for_review, synchronize]
branches:
- dev
- staging
- main

jobs:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/pr_title.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR Title"

on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize, edited]
branches:
- dev
- main

permissions:
pull-requests: read

jobs:
lint-pr-title:
name: Conventional Commit PR title
runs-on: self-hosted
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# types: [opened, reopened, ready_for_review, synchronize]
# branches:
# - dev
# - staging
# - main

# jobs:
Expand Down