Skip to content

Commit e57e880

Browse files
committed
Debugging.
1 parent 52cdea7 commit e57e880

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/actions/debug/action.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,29 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Debug GitHub Actions Environment
10+
env:
11+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1013
run: |
1114
echo "### 🔍 Checking GitHub Secrets & Environment Variables ###"
1215
1316
# Check if GITHUB_TOKEN is set
14-
if [[ -z "${{ secrets.GITHUB_TOKEN }}" ]]; then
17+
if [[ -z "$GITHUB_TOKEN" ]]; then
1518
echo "❌ GITHUB_TOKEN is NOT set. This may be due to missing permissions or a misconfigured repository secret.";
1619
else
1720
echo "✅ GITHUB_TOKEN is set.";
1821
fi
1922
2023
# Check if NPM_TOKEN is set
21-
if [[ -z "${{ secrets.NPM_TOKEN }}" ]]; then
24+
if [[ -z "$NPM_TOKEN" ]]; then
2225
echo "❌ NPM_TOKEN is NOT set. Ensure it exists in repository secrets under Settings → Secrets.";
2326
else
2427
echo "✅ NPM_TOKEN is set.";
2528
fi
2629
27-
# Check if the GitHub token from the context is available
28-
if [[ -z "${{ github.token }}" ]]; then
29-
echo "❌ github.token is NOT set. This is unusual since it's auto-generated by GitHub.";
30-
else
31-
echo "✅ github.token is available.";
32-
fi
33-
3430
# Check current GitHub Actions permissions
3531
echo "🔹 Workflow permissions setting:"
36-
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
32+
curl -s -H "Authorization: token $GITHUB_TOKEN" \
3733
-H "Accept: application/vnd.github.v3+json" \
3834
https://api.github.com/repos/${{ github.repository }} \
3935
| jq '.permissions'

0 commit comments

Comments
 (0)