Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/actions/setup-docker/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Set up Docker"
description: >-
Set up QEMU + Docker Buildx and authenticate to Docker Hub for multi-arch
image builds. Centralizes the QEMU/Buildx/login trio used by release,
preview, and stable workflows.

inputs:
dockerhub-username:
description: "Docker Hub username (pass from secrets)"
required: true
dockerhub-token:
description: "Docker Hub token/password (pass from secrets)"
required: true

runs:
using: "composite"
steps:
- uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4.1.0
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
username: ${{ inputs.dockerhub-username }}
password: ${{ inputs.dockerhub-token }}
13 changes: 13 additions & 0 deletions .github/actions/setup-hatch/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Set up Hatch build tooling"
description: >-
Install the pinned hatch / hatchling / virtualenv toolchain used to build
and publish the package. Assumes Python is already set up by the caller.

runs:
using: "composite"
steps:
- shell: bash
run: |
python -m pip install --upgrade pip
pip install "virtualenv<20.36"
pip install hatchling==1.27.0 hatch==1.14.0
49 changes: 49 additions & 0 deletions .github/actions/setup-sfw/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Set up Socket Firewall"
description: >-
Set up the requested language toolchain and install Socket Firewall (free
or enterprise edition) so subsequent steps can run package-manager commands
wrapped with `sfw`. Defaults to free/anonymous mode (no API token -- safe on
untrusted / Dependabot / fork PRs). Pass mode: firewall-enterprise +
socket-token for full org-policy enforcement on trusted maintainer PRs.

inputs:
python:
description: "Set up Python 3.12"
default: "false"
node:
description: "Set up Node 20 (needed for npm-wrapped checks)"
default: "false"
uv:
description: "Install uv (implies Python)"
default: "false"
mode:
description: "socketdev/action mode: firewall-free or firewall-enterprise"
default: "firewall-free"
socket-token:
description: "Socket API token (only used/required for firewall-enterprise)"
default: ""

runs:
using: "composite"
steps:
- if: ${{ inputs.python == 'true' || inputs.uv == 'true' }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"

- if: ${{ inputs.node == 'true' }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "20"

# Official Socket setup action. Wires up sfw routing correctly.
# socket-token is ignored in firewall-free mode and empty when absent.
- uses: socketdev/action@ba6de6cc0565af1f42295590380973573297e31f # v1.3.2
with:
mode: ${{ inputs.mode }}
socket-token: ${{ inputs.socket-token }}

- if: ${{ inputs.uv == 'true' }}
name: Install uv
shell: bash
run: python -m pip install --upgrade pip uv
6 changes: 4 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ updates:
cooldown:
default-days: 7

# GitHub Actions used in workflows
# GitHub Actions used in workflows and local composite actions.
- package-ecosystem: "github-actions"
directory: "/"
directories:
- "/"
- "/.github/actions/*"
schedule:
interval: "weekly"
open-pull-requests-limit: 2
Expand Down
205 changes: 0 additions & 205 deletions .github/workflows/dependabot-review.yml

This file was deleted.

Loading