Skip to content

Commit e886066

Browse files
authored
chore(ci): bump socket-registry action refs (#157)
* chore(ci): bump socket-registry action refs + remove close/reopen workaround * Fix flaky getSocketCliApiProxy test on CI runners The test expected undefined when SOCKET_CLI_API_PROXY is unset, but getSocketCliApiProxy falls back to standard proxy env vars (HTTPS_PROXY, HTTP_PROXY, etc.) which CI runners set. Clear all fallback vars in the test to ensure isolation.
1 parent c5c80f0 commit e886066

4 files changed

Lines changed: 14 additions & 22 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ permissions:
2727
jobs:
2828
ci:
2929
name: Run CI Pipeline
30-
uses: SocketDev/socket-registry/.github/workflows/ci.yml@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
30+
uses: SocketDev/socket-registry/.github/workflows/ci.yml@d425cd0501e354096f35043e1badecc370a2fecf # main
3131
with:
3232
test-setup-script: 'pnpm run build'
3333
lint-script: 'pnpm run lint --all'
@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
timeout-minutes: 10
4848
steps:
49-
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
49+
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@d425cd0501e354096f35043e1badecc370a2fecf # main
5050
with:
5151
node-version: '24'
5252

.github/workflows/provenance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121

2222
jobs:
2323
publish:
24-
uses: SocketDev/socket-registry/.github/workflows/provenance.yml@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
24+
uses: SocketDev/socket-registry/.github/workflows/provenance.yml@d425cd0501e354096f35043e1badecc370a2fecf # main
2525
with:
2626
debug: ${{ inputs.debug }}
2727
package-name: '@socketsecurity/lib'

.github/workflows/weekly-update.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
outputs:
2525
has-updates: ${{ steps.check.outputs.has-updates }}
2626
steps:
27-
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
27+
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@d425cd0501e354096f35043e1badecc370a2fecf # main
2828

2929
- name: Check for npm updates
3030
id: check
@@ -48,7 +48,7 @@ jobs:
4848
contents: write
4949
pull-requests: write
5050
steps:
51-
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
51+
- uses: SocketDev/socket-registry/.github/actions/setup-and-install@d425cd0501e354096f35043e1badecc370a2fecf # main
5252

5353
- name: Create update branch
5454
id: branch
@@ -60,7 +60,7 @@ jobs:
6060
git checkout -b "$BRANCH_NAME"
6161
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT
6262
63-
- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
63+
- uses: SocketDev/socket-registry/.github/actions/setup-git-signing@d425cd0501e354096f35043e1badecc370a2fecf # main
6464
with:
6565
gpg-private-key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
6666

@@ -273,21 +273,6 @@ jobs:
273273
--head "$BRANCH_NAME" \
274274
--base main
275275
276-
# Pushes made with GITHUB_TOKEN don't trigger other workflows.
277-
# Close/reopen the PR to generate a pull_request.reopened event,
278-
# which triggers required CI and enterprise audit workflows.
279-
- name: Trigger CI checks
280-
if: steps.final.outputs.success == 'true' && steps.validate.outputs.valid == 'true' && steps.changes.outputs.has-changes == 'true'
281-
env:
282-
GH_TOKEN: ${{ github.token }}
283-
BRANCH_NAME: ${{ steps.branch.outputs.branch }}
284-
run: |
285-
pr_number=$(gh pr list --head "$BRANCH_NAME" --json number --jq '.[0].number')
286-
if [ -n "$pr_number" ]; then
287-
gh pr close "$pr_number"
288-
gh pr reopen "$pr_number"
289-
fi
290-
291276
- name: Add job summary
292277
if: steps.final.outputs.success == 'true' && steps.validate.outputs.valid == 'true' && steps.changes.outputs.has-changes == 'true'
293278
env:
@@ -310,7 +295,7 @@ jobs:
310295
test-output.log
311296
retention-days: 7
312297

313-
- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@6147a08ccc20fcb1f690dcc4650ec745776b3345 # main
298+
- uses: SocketDev/socket-registry/.github/actions/cleanup-git-signing@d425cd0501e354096f35043e1badecc370a2fecf # main
314299
if: always()
315300

316301
notify:

test/unit/env/socket-cli.test.mts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@ describe('socket-cli env', () => {
6565
})
6666

6767
it('should return undefined when not set', () => {
68+
// Clear all proxy env vars that getSocketCliApiProxy falls back to,
69+
// including standard proxy vars that CI runners may have set.
6870
setEnv('SOCKET_CLI_API_PROXY', undefined)
71+
setEnv('SOCKET_SECURITY_API_PROXY', undefined)
72+
setEnv('HTTPS_PROXY', undefined)
73+
setEnv('https_proxy', undefined)
74+
setEnv('HTTP_PROXY', undefined)
75+
setEnv('http_proxy', undefined)
6976
expect(getSocketCliApiProxy()).toBeUndefined()
7077
})
7178
})

0 commit comments

Comments
 (0)