diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6c3881..e38b863 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,9 @@ on: - 'main' pull_request: {} +permissions: + contents: read + defaults: run: shell: bash @@ -16,6 +19,13 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - name: Configure Socket Firewall + uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d # v1 + with: + token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }} + allow-external-fork-fallback: true - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 with: version: 10 @@ -36,6 +46,10 @@ jobs: run: | pnpm run lint + - name: Restore public package registry + if: ${{ always() }} + uses: workos/setup-socket-firewall/teardown@ca93dd8aa351f54f4729fe3377a9be23c631c25d # v1 + test: name: Test Node ${{ matrix.node }} runs-on: ubuntu-latest @@ -44,6 +58,13 @@ jobs: node: [20, 22, 24] steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false + - name: Configure Socket Firewall + uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d # v1 + with: + token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }} + allow-external-fork-fallback: true - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 with: version: 10 @@ -63,3 +84,7 @@ jobs: - name: Test run: | pnpm run test:coverage -- --run + + - name: Restore public package registry + if: ${{ always() }} + uses: workos/setup-socket-firewall/teardown@ca93dd8aa351f54f4729fe3377a9be23c631c25d # v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf08482..c4fbc6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,18 +31,24 @@ jobs: id-token: write steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - with: - version: 10 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 24 registry-url: 'https://registry.npmjs.org' - cache: 'pnpm' + - name: Configure Socket Firewall + uses: workos/setup-socket-firewall@ca93dd8aa351f54f4729fe3377a9be23c631c25d # v1 + with: + token: ${{ secrets.PUBLIC_SOCKET_FIREWALL_TOKEN }} + - uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 + with: + version: 10 - name: Install Dependencies run: pnpm install + - name: Restore public package registry + uses: workos/setup-socket-firewall/teardown@ca93dd8aa351f54f4729fe3377a9be23c631c25d # v1 + - name: Build project run: pnpm run build