Skip to content

Commit 475fcfa

Browse files
committed
chore(ci): improve workflow caching and update changelog
- Switch claude review trigger to pull_request for better security - Enhance Docker build caching in release workflow (GHA + registry) - Document caching improvements in changelog
1 parent b46537d commit 475fcfa

3 files changed

Lines changed: 24 additions & 17 deletions

File tree

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Claude Code Review
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [opened, reopened]
66
issue_comment:
77
types: [created]
@@ -14,18 +14,18 @@ concurrency:
1414
jobs:
1515
claude-review:
1616
if: |
17-
github.event_name == 'pull_request_target' ||
18-
(github.event_name == 'issue_comment' &&
19-
github.event.issue.pull_request &&
17+
github.event_name == 'pull_request' ||
18+
(github.event_name == 'issue_comment' &&
19+
github.event.issue.pull_request &&
2020
contains(github.event.comment.body, '@claude'))
21-
21+
2222
runs-on: ubuntu-latest
2323
permissions:
2424
contents: read
2525
pull-requests: write
2626
issues: write
2727
id-token: write
28-
28+
2929
steps:
3030
- name: Checkout repository
3131
uses: actions/checkout@v4
@@ -39,10 +39,10 @@ jobs:
3939
with:
4040
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
4141
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
42+
4343
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
4444
# model: "claude-opus-4-20250514"
45-
45+
4646
# Direct prompt for automated review (no @claude mention needed)
4747
direct_prompt: |
4848
Please review this pull request and provide feedback on:
@@ -51,28 +51,27 @@ jobs:
5151
- Performance considerations
5252
- Security concerns
5353
- Test coverage
54-
54+
5555
Be constructive and helpful in your feedback.
56-
56+
5757
# Optional: Customize review based on file types
5858
# direct_prompt: |
5959
# Review this PR focusing on:
6060
# - For TypeScript files: Type safety and proper interface usage
6161
# - For API endpoints: Security, input validation, and error handling
6262
# - For React components: Performance, accessibility, and best practices
6363
# - For tests: Coverage, edge cases, and test quality
64-
64+
6565
# Optional: Different prompts for different authors
6666
# direct_prompt: |
67-
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
67+
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
6868
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
6969
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
70-
70+
7171
# Optional: Add specific tools for running tests or linting
7272
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
73-
73+
7474
# Optional: Skip review for certain conditions
7575
# if: |
7676
# !contains(github.event.pull_request.title, '[skip-review]') &&
7777
# !contains(github.event.pull_request.title, '[WIP]')
78-

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,12 @@ jobs:
5656
push: true
5757
tags: ${{ steps.meta.outputs.tags }}
5858
labels: ${{ steps.meta.outputs.labels }}
59-
cache-from: type=gha
60-
cache-to: type=gha,mode=max
59+
cache-from: |
60+
type=gha
61+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
62+
cache-to: |
63+
type=gha,mode=max
64+
type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
6165
6266
release:
6367
name: Create GitHub Release

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
- Improved logging organization
2525
- Updated documentation with logging capabilities and examples
2626

27+
### Performance
28+
- Docker build caching in GitHub Actions (dual GHA + registry cache strategy)
29+
30+
2731
## [0.1.0] - 2025-06-21
2832

2933
### Added

0 commit comments

Comments
 (0)