Skip to content

Commit f0f446e

Browse files
authored
chore(ci): add GPG commit signing to weekly-update workflow (#1156)
* chore(ci): add GPG commit signing to weekly-update workflow * chore(ci): improve Claude prompt structure in weekly-update
1 parent f63af52 commit f0f446e

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

.github/workflows/weekly-update.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,14 @@ jobs:
8686
GH_TOKEN: ${{ github.token }}
8787
run: |
8888
BRANCH_NAME="weekly-update-$(date +%Y%m%d)"
89-
git config user.name "github-actions[bot]"
90-
git config user.email "github-actions[bot]@users.noreply.github.com"
9189
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git"
9290
git checkout -b "$BRANCH_NAME"
9391
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
9492
93+
- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@6096b06b1790f411714c89c40f72aade2eeaab7c # main
94+
with:
95+
gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
96+
9597
- name: Run updating skill with Claude Code
9698
id: claude
9799
timeout-minutes: 30
@@ -108,7 +110,28 @@ jobs:
108110
set +e
109111
pnpm exec claude --print --dangerously-skip-permissions \
110112
--model sonnet \
111-
"/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." \
113+
"$(cat <<'PROMPT'
114+
/updating
115+
116+
<context>
117+
You are an automated CI agent in a weekly dependency update workflow.
118+
Git is configured with GPG signing. A branch has been created for you.
119+
</context>
120+
121+
<instructions>
122+
Update all dependencies to their latest versions.
123+
Create one atomic commit per dependency update with a conventional commit message.
124+
Leave all changes local — the workflow handles pushing and PR creation.
125+
Skip running builds, tests, and type checks — CI runs those separately.
126+
</instructions>
127+
128+
<success_criteria>
129+
Each updated dependency has its own commit.
130+
The lockfile is consistent with package.json changes.
131+
No uncommitted changes remain in the working tree.
132+
</success_criteria>
133+
PROMPT
134+
)" \
112135
2>&1 | tee claude-output.log
113136
CLAUDE_EXIT=${PIPESTATUS[0]}
114137
set -e
@@ -182,6 +205,9 @@ jobs:
182205
path: claude-output.log
183206
retention-days: 7
184207

208+
- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@6096b06b1790f411714c89c40f72aade2eeaab7c # main
209+
if: always()
210+
185211
notify:
186212
name: Notify results
187213
needs: [check-updates, apply-updates]

0 commit comments

Comments
 (0)