Skip to content

Commit 41af8c3

Browse files
authored
chore(ci): add GPG commit signing to weekly-update workflow (#547)
* chore(ci): add GPG commit signing to bot workflows * chore(ci): improve Claude prompt structure in weekly-update
1 parent 880ee30 commit 41af8c3

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

.github/workflows/generate.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ jobs:
6565
echo "has_changes=false" >> $GITHUB_OUTPUT
6666
fi
6767
68-
- name: Configure git
68+
- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@6096b06b1790f411714c89c40f72aade2eeaab7c # main
6969
if: steps.check.outputs.has_changes == 'true'
70-
run: |
71-
git config --global user.name "github-actions[bot]"
72-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
70+
with:
71+
gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
7372

7473
- name: Commit and push changes
7574
if: steps.check.outputs.has_changes == 'true'
@@ -113,6 +112,9 @@ jobs:
113112
echo "PR #$existing_pr already exists, skipping creation"
114113
fi
115114
115+
- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@6096b06b1790f411714c89c40f72aade2eeaab7c # main
116+
if: always()
117+
116118
validate:
117119
name: Validate generated SDK
118120
needs: fetch_and_update

.github/workflows/weekly-update.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ jobs:
5757
GH_TOKEN: ${{ github.token }}
5858
run: |
5959
BRANCH_NAME="weekly-update-$(date +%Y%m%d)"
60-
git config user.name "github-actions[bot]"
61-
git config user.email "github-actions[bot]@users.noreply.github.com"
6260
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
6361
git checkout -b "$BRANCH_NAME"
6462
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
6563
64+
- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@6096b06b1790f411714c89c40f72aade2eeaab7c # main
65+
with:
66+
gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
67+
6668
- name: Run updating skill with Claude Code
6769
id: claude
6870
timeout-minutes: 30
@@ -79,7 +81,28 @@ jobs:
7981
set +e
8082
pnpm exec claude --print --dangerously-skip-permissions \
8183
--model sonnet \
82-
"/updating - Run the updating skill to update all dependencies. Create atomic commits for each update. You are running in CI mode - skip builds and tests. Do not push or create a PR." \
84+
"$(cat <<'PROMPT'
85+
/updating
86+
87+
<context>
88+
You are an automated CI agent in a weekly dependency update workflow.
89+
Git is configured with GPG signing. A branch has been created for you.
90+
</context>
91+
92+
<instructions>
93+
Update all dependencies to their latest versions.
94+
Create one atomic commit per dependency update with a conventional commit message.
95+
Leave all changes local — the workflow handles pushing and PR creation.
96+
Skip running builds, tests, and type checks — CI runs those separately.
97+
</instructions>
98+
99+
<success_criteria>
100+
Each updated dependency has its own commit.
101+
The lockfile is consistent with package.json changes.
102+
No uncommitted changes remain in the working tree.
103+
</success_criteria>
104+
PROMPT
105+
)" \
83106
2>&1 | tee claude-output.log
84107
CLAUDE_EXIT=${PIPESTATUS[0]}
85108
set -e
@@ -153,6 +176,9 @@ jobs:
153176
path: claude-output.log
154177
retention-days: 7
155178

179+
- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@6096b06b1790f411714c89c40f72aade2eeaab7c # main
180+
if: always()
181+
156182
notify:
157183
name: Notify results
158184
needs: [check-updates, apply-updates]

0 commit comments

Comments
 (0)