Skip to content

Commit c727a49

Browse files
committed
Update Claude workflow by modifying Docker image reference format, enhancing environment variable debugging, and updating GitHub token reference for improved clarity and reliability.
1 parent 9e0b60c commit c727a49

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/actions/claude-code-action/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ inputs:
1111

1212
runs:
1313
using: "docker"
14-
image: "ghcr.io/mervinpraison/praisonai-claudecode:latest"
14+
image: "docker://ghcr.io/mervinpraison/praisonai-claudecode:latest"
1515
env:
1616
ANTHROPIC_API_KEY: ${{ inputs.anthropic_api_key }}
1717
GITHUB_TOKEN: ${{ inputs.github_token }}

.github/actions/claude-code-action/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ PROMPT="Analyse the GitHub issue or PR context and generate a smart response bas
1111
export ANTHROPIC_API_KEY="${1#--anthropic-api-key=}"
1212
export GITHUB_TOKEN="${2#--github-token=}"
1313

14+
# Debug environment variables
15+
echo "ANTHROPIC_API_KEY set: $([ -n "$ANTHROPIC_API_KEY" ] && echo "yes" || echo "no")"
16+
echo "GITHUB_TOKEN set: $([ -n "$GITHUB_TOKEN" ] && echo "yes" || echo "no")"
17+
1418
# Verify environment variables
1519
if [ -z "$ANTHROPIC_API_KEY" ] || [ -z "$GITHUB_TOKEN" ]; then
1620
echo "Error: Required environment variables are not set"
21+
echo "Args received: $@"
1722
exit 1
1823
fi
1924

.github/workflows/build-image.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ jobs:
2626
with:
2727
registry: ghcr.io
2828
username: ${{ github.actor }}
29-
password: ${{ secrets.GITHUB_TOKEN }}
29+
password: ${{ secrets.GH_TOKEN }}
3030

3131
- name: Build and push Docker image
3232
uses: docker/build-push-action@v5
3333
with:
3434
context: ./.github/actions/claude-code-action
3535
push: true
36+
platforms: linux/amd64
3637
tags: ghcr.io/mervinpraison/praisonai-claudecode:${{ inputs.version }}
3738
cache-from: type=gha
3839
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)