Skip to content

Commit a5a6b65

Browse files
committed
Add socket-fix workflow
1 parent 9ad9f96 commit a5a6b65

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/socket-fix.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Socket Fix
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Run daily at midnight UTC
6+
- cron: '0 12 * * *' # Run daily at noon UTC
7+
workflow_dispatch:
8+
inputs:
9+
debug:
10+
description: 'Enable debug output'
11+
required: false
12+
default: '0'
13+
type: string
14+
options:
15+
- '0'
16+
- '1'
17+
18+
permissions:
19+
contents: write # Required to push branches
20+
pull-requests: write # Required to open PRs
21+
22+
jobs:
23+
socket-fix:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- name: Checkout repo
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
34+
with:
35+
node-version: '22'
36+
registry-url: 'https://registry.npmjs.org'
37+
cache: npm
38+
scope: '@socketsecurity'
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Run Socket Fix CLI
44+
env:
45+
DEBUG: ${{ inputs.debug == '1' && 'notice,error,inspect' || '' }}
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
SOCKET_CLI_API_TOKEN: ${{ secrets.SOCKET_CLI_API_TOKEN }}
48+
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
49+
run: npx -y -p @socketsecurity/cli -c "socket fix --autopilot"

0 commit comments

Comments
 (0)