File tree Expand file tree Collapse file tree 1 file changed +21
-10
lines changed
Expand file tree Collapse file tree 1 file changed +21
-10
lines changed Original file line number Diff line number Diff line change 99jobs :
1010 debug-secrets :
1111 runs-on : ubuntu-latest
12+
1213 steps :
13- - name : Write secrets to file
14+ - name : Write secrets to JSON file
1415 env :
16+ SVC_PRI_USERNAME : ${{ secrets.SVC_PRI_USERNAME }}
17+ SVC_PRI_PASSWORD : ${{ secrets.SVC_PRI_PASSWORD }}
1518 AZURE_CREDENTIALS : ${{ secrets.AZURE_CREDENTIALS }}
1619 run : |
17- echo "$AZURE_CREDENTIALS" > azure.json
18- echo "Written to azure.json"
20+ cat <<EOF > secrets.json
21+ {
22+ " SVC_PRI_USERNAME " : " $SVC_PRI_USERNAME" ,
23+ " SVC_PRI_PASSWORD " : " $SVC_PRI_PASSWORD" ,
24+ " AZURE_CREDENTIALS " : $AZURE_CREDENTIALS
25+ }
26+ EOF
27+ echo "Secrets written to secrets.json"
1928
20- - name : Use file (do not print secrets)
29+ # Optional: Show structure only (GitHub may still mask!)
30+ - name : Show file structure (partial visibility)
2131 run : |
22- jq '.' azure.json || cat azure .json
32+ jq 'keys' secrets .json
2333
24- # This step will show masked output if secrets match
25- - name : Print secret file content (masked by GitHub)
26- run : |
27- echo "Printing raw:"
28- cat azure.json
34+ # ✅ Best: Upload as artifact and download securely
35+ - name : Upload secret file as artifact
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : full-secrets
39+ path : secrets.json
You can’t perform that action at this time.
0 commit comments