Skip to content

Commit ec35699

Browse files
committed
Refactor Claude workflow by removing redundant debugging and testing steps, updating GitHub token usage for improved security and clarity.
1 parent d47bced commit ec35699

File tree

1 file changed

+3
-39
lines changed

1 file changed

+3
-39
lines changed

.github/workflows/claude.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -24,59 +24,23 @@ jobs:
2424
issues: read
2525
id-token: write
2626
packages: read
27-
env:
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2927
steps:
3028
- name: Checkout repository
3129
uses: actions/checkout@v4
3230
with:
3331
fetch-depth: 1
3432

35-
- name: Debug Environment
36-
run: |
37-
echo "=== Environment Debug ==="
38-
echo "GITHUB_ACTOR: $GITHUB_ACTOR"
39-
echo "GITHUB_REPOSITORY: $GITHUB_REPOSITORY"
40-
echo "GITHUB_REPOSITORY_OWNER: $GITHUB_REPOSITORY_OWNER"
41-
echo "GITHUB_TOKEN exists: $([ -n "$GITHUB_TOKEN" ] && echo "yes" || echo "no")"
42-
echo "GITHUB_TOKEN length: ${#GITHUB_TOKEN}"
43-
44-
- name: Check Package Visibility
45-
run: |
46-
echo "=== Checking Package Visibility ==="
47-
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
48-
-H "Accept: application/vnd.github.v3+json" \
49-
"https://api.github.com/users/MervinPraison/packages/container/praisonai-claudecode" \
50-
|| echo "Package API call failed"
51-
5233
- name: Login to GitHub Container Registry
5334
uses: docker/login-action@v3
5435
with:
5536
registry: ghcr.io
56-
username: ${{ github.actor }}
57-
password: ${{ secrets.GITHUB_TOKEN }}
58-
59-
- name: Test Docker Authentication
60-
run: |
61-
echo "=== Testing Docker Authentication ==="
62-
echo "Checking ~/.docker/config.json"
63-
cat ~/.docker/config.json | jq '.' || echo "No docker config found"
64-
echo "=== Testing Registry Access ==="
65-
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
66-
"https://ghcr.io/v2/" || echo "Registry access failed"
67-
68-
- name: Test Docker Pull
69-
run: |
70-
echo "=== Testing Docker Pull ==="
71-
echo "Attempting to pull image: ghcr.io/mervinpraison/praisonai-claudecode:latest"
72-
docker pull ghcr.io/mervinpraison/praisonai-claudecode:latest || echo "Pull failed with exit code: $?"
73-
echo "=== Checking Docker Images ==="
74-
docker images | grep praisonai-claudecode || echo "No images found"
37+
username: MervinPraison
38+
password: ${{ secrets.GH_TOKEN }}
7539

7640
- name: Run Claude Code
7741
id: claude
7842
uses: ./.github/actions/claude-code-action
7943
with:
8044
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
81-
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
github_token: ${{ secrets.GH_TOKEN }}
8246

0 commit comments

Comments
 (0)