Skip to content

Commit 4218501

Browse files
emcdclaude
andcommitted
Fix Claude GitHub Actions v1 parameter conversion and update testing strategy.
Convert deprecated parameters to claude_args format: - allowed_tools -> --allowedTools with proper quoting - timeout_minutes -> --timeout Point claude.yaml to @master temporarily for development testing due to GitHub Actions security constraints requiring identical workflow files on default branch. Update documentation to reflect revised testing approach on master branch. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3be8326 commit 4218501

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.auxiliary/notes/claude-gha-enhancements.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,21 @@ Upgrade Claude GitHub Actions workflow from beta to v1 and add MCP server integr
3232
### Step 1: Beta to V1 Upgrade
3333
- Update `.github/workflows/xrepo--claude.yaml:53`
3434
- Change `anthropics/claude-code-action@beta` to `anthropics/claude-code-action@v1`
35-
- No parameter changes needed (already v1-compatible)
35+
- **CORRECTION**: Parameter changes required for v1:
36+
- `allowed_tools``claude_args: --allowedTools "${{ inputs.allowed-tools }}"`
37+
- `timeout_minutes``claude_args: --timeout ${{ inputs.timeout-minutes }}`
3638
- Commit changes
3739

3840
### Step 2: Add Manual Triggers
3941
- Add `workflow_dispatch` trigger to workflow
4042
- Commit changes
4143
- Push master branch
4244

43-
### Step 3: Branch Strategy
44-
- Checkout `claude-gha` branch
45-
- Temporarily modify `.github/workflows/claude.yaml` to point to xrepo workflow on this branch
46-
- Enables isolated testing without affecting production
45+
### Step 3: Testing Strategy (Revised)
46+
- Test directly on `master` branch due to GitHub Actions security constraints
47+
- Temporarily modify `.github/workflows/claude.yaml` to point to xrepo workflow `@master`
48+
- GitHub Actions validates workflow files must be identical to default branch, preventing branch isolation
49+
- Will revert to `@gha-1` after successful testing and tag update
4750

4851
### Step 4: MCP Integration
4952
Add to xrepo workflow:

.github/workflows/claude.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
id-token: write
3636
issues: read
3737
pull-requests: read
38-
uses: emcd/python-project-common/.github/workflows/xrepo--claude.yaml@gha-1
38+
uses: emcd/python-project-common/.github/workflows/xrepo--claude.yaml@master
3939
with:
4040
allowed-tools: 'Bash(git add:*),Bash(git branch:*),Bash(git checkout:*),Bash(git diff:*),Bash(git log:*),Bash(git ls-files:*),Bash(git remote:*),Bash(git reset:*),Bash(git rev-parse:*),Bash(git rm:*),Bash(git status),Bash(hatch:*),Bash(pip:*),Bash(python:*),Edit,Write'
4141
python-version: '${{ fromJSON(needs.initialize.outputs.python-versions)[0] }}'

.github/workflows/xrepo--claude.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ jobs:
5656
id: claude
5757
uses: anthropics/claude-code-action@v1
5858
with:
59-
allowed_tools: ${{ inputs.allowed-tools }}
6059
anthropic_api_key: ${{ secrets.anthropic-api-key }}
61-
timeout_minutes: ${{ inputs.timeout-minutes }}
6260
trigger_phrase: "/claude"
6361
prompt: ${{ inputs.prompt }}
62+
claude_args: |
63+
--allowedTools "${{ inputs.allowed-tools }}"
64+
--timeout ${{ inputs.timeout-minutes }}

0 commit comments

Comments
 (0)