File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 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'
You can’t perform that action at this time.
0 commit comments