Skip to content

Commit 5607e50

Browse files
authored
Update main.yml
1 parent 55b2475 commit 5607e50

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

.github/workflows/main.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1-
- name: Debug PGP Key (只打印头部)
2-
run: |
3-
echo "${{ secrets.SIGNING_KEY }}" | head -n 5
1+
name: 🔐 Check Secrets Injection
2+
3+
on:
4+
workflow_dispatch: # 你可以手动触发这个 workflow
5+
6+
jobs:
7+
check-secrets:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: 🔍 检查 SIGNING_KEY 是否存在
12+
run: |
13+
if [ -z "${{ secrets.SIGNING_KEY }}" ]; then
14+
echo "❌ SIGNING_KEY 未配置或为空"
15+
else
16+
echo "✅ SIGNING_KEY 已配置"
17+
fi
18+
19+
- name: 🔍 检查 SIGNING_PASSWORD 是否存在
20+
run: |
21+
if [ -z "${{ secrets.SIGNING_PASSWORD }}" ]; then
22+
echo "❌ SIGNING_PASSWORD 未配置或为空"
23+
else
24+
echo "✅ SIGNING_PASSWORD 已配置"
25+
fi
26+
27+
- name: 📏 显示 SIGNING_KEY 长度
28+
run: |
29+
echo "SIGNING_KEY 字符长度: $(echo '${{ secrets.SIGNING_KEY }}' | wc -c)"
30+
31+
- name: 🔐 检查 SIGNING_KEY 是否为 PGP 格式
32+
run: |
33+
echo "${{ secrets.SIGNING_KEY }}" | grep "-----BEGIN PGP PRIVATE KEY BLOCK-----" && echo "✅ 私钥格式正确" || echo "❌ 缺少 PGP 私钥头"
34+
35+
- name: 🔐 显示 SIGNING_KEY 前 5 行(调试用,可删)
36+
run: |
37+
echo "👇 SIGNING_KEY 预览(前 5 行):"
38+
echo "${{ secrets.SIGNING_KEY }}" | head -n 5

0 commit comments

Comments
 (0)