Skip to content

Commit d60605c

Browse files
fix(ci): update claude-code-action usage for v1 GA API
- Use `prompt` input instead of removed `prompt_file` - Move `--allowedTools` and `--max-turns` to `claude_args` - Add `id-token: write` permission required for OIDC token - Pass prompt content via GITHUB_ENV to avoid shell escaping issues Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent eda58ec commit d60605c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/cicd_comp_ai-release-notes-phase.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
permissions:
5050
contents: write # gh release view + gh release edit
5151
pull-requests: read # Octokit pulls.get for PR details
52+
id-token: write # Required by claude-code-action for OIDC
5253
# All run: blocks reference these via $RELEASE_TAG / $REPO instead of
5354
# direct ${{ }} interpolation to prevent shell injection from crafted tags.
5455
env:
@@ -130,20 +131,27 @@ jobs:
130131
echo "- **Skipped**: ${SKIPPED}" >> "$GITHUB_STEP_SUMMARY"
131132
132133
- name: Assemble prompt
134+
id: prompt
133135
run: |
136+
# Build the full prompt: template + JSON data
134137
cat .github/scripts/gather-release-data/prompt-template.md > /tmp/claude-prompt.md
135138
printf '\n---\n\n## Release Data (JSON)\n\n```json\n' >> /tmp/claude-prompt.md
136139
cat /tmp/release-data.json >> /tmp/claude-prompt.md
137140
printf '\n```\n' >> /tmp/claude-prompt.md
138141
142+
# Pass prompt content via environment file to avoid shell escaping issues
143+
{
144+
echo 'PROMPT_CONTENT<<PROMPT_EOF'
145+
cat /tmp/claude-prompt.md
146+
echo 'PROMPT_EOF'
147+
} >> "$GITHUB_ENV"
148+
139149
- name: Generate release notes with Claude
140150
uses: anthropics/claude-code-action@v1
141151
with:
142152
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
143-
prompt_file: /tmp/claude-prompt.md
144-
allowed_tools: "Write"
145-
max_turns: 3
146-
timeout_minutes: 10
153+
prompt: ${{ env.PROMPT_CONTENT }}
154+
claude_args: "--allowedTools Write --max-turns 3"
147155

148156
- name: Update release description
149157
env:

0 commit comments

Comments
 (0)