From 31b5308d67185281bdea622f662294855e751cdb Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 7 May 2026 09:42:26 -0700 Subject: [PATCH] ci: add Socket Fix autopilot workflow and exempt bot PRs from commit validation --- .github/workflows/pr.yml | 1 + .github/workflows/socket-fix.yml | 46 ++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/workflows/socket-fix.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index eafd2fd..2a883d5 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,6 +12,7 @@ permissions: jobs: validate-commits: runs-on: ubuntu-latest + if: github.event.pull_request.user.type != 'Bot' steps: - name: Checkout Repository uses: actions/checkout@v4 diff --git a/.github/workflows/socket-fix.yml b/.github/workflows/socket-fix.yml new file mode 100644 index 0000000..3ee20d3 --- /dev/null +++ b/.github/workflows/socket-fix.yml @@ -0,0 +1,46 @@ +name: Socket Fix + +on: + schedule: + - cron: "17 6 * * 1,4" # Mon + Thu 6:17am UTC + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + fix: + runs-on: ubuntu-latest + steps: + - name: Generate GitHub App token + id: generate-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.GH_REPO_ACCESS_APP_ID }} + private-key: ${{ secrets.GH_REPO_ACCESS_PRIVATE_KEY }} + + - uses: actions/checkout@v4 + with: + token: ${{ steps.generate-token.outputs.token }} + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - uses: astral-sh/setup-uv@v4 + + - name: Install dependencies + run: uv sync --all-extras --all-packages + + - uses: actions/setup-node@v4 + with: + node-version: "22" + + - name: Run Socket Fix + env: + SOCKET_CLI_GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + SOCKET_CLI_API_TOKEN: ${{ secrets.SOCKET_API_TOKEN }} + SOCKET_CLI_GIT_USER_NAME: github-actions[bot] + SOCKET_CLI_GIT_USER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com + run: npx @socketsecurity/cli fix --autopilot