Skip to content
Merged
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
20 changes: 18 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,21 @@ jobs:
with:
node-version: "lts/*"
- run: npm install -g @commitlint/cli @commitlint/config-conventional commitlint-plugin-regex-match
- name: Lint PR title

- name: Get PR title
id: get_pr_title
run: |
PR_TITLE="${{ github.event.pull_request.title }}"
echo "$PR_TITLE" | npx commitlint
# Escape quotes for JSON
PR_TITLE_ESCAPED=$(echo "$PR_TITLE" | sed 's/"/\\"/g')
echo "pr_title=$PR_TITLE_ESCAPED" >> $GITHUB_OUTPUT

- name: Lint PR title
run: |
# Write title to temp file
echo "${{ steps.get_pr_title.outputs.pr_title }}" > pr_title.txt
# Lint from file
npx commitlint --edit pr_title.txt

lint_code:
name: Lint Go Code
Expand Down Expand Up @@ -140,6 +151,11 @@ jobs:

release:
name: Release
permissions:
contents: write
issues: write
pull-requests: write
deployments: write
needs:
- test_unit
- build_and_push
Expand Down
Loading