Skip to content
Merged
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: 22 additions & 1 deletion .github/workflows/clean-branch-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,30 @@ on:
types:
- closed

permissions: {}

jobs:
cleanup:
name: Cleanup caches for a merged branch
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
actions: write
uses: DigintLab/github/.github/workflows/clean-branch-cache.yml@cleanup-v0
steps:
- name: Cleanup
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#managing-caches
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
run: |
echo "Fetching list of cache keys"
cache_ids=$(gh cache list --ref "${BRANCH}" --limit 100 --json id --jq '.[].id')

# Do not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cache_id in $cache_ids; do
gh cache delete "$cache_id"
done
echo "Done"
72 changes: 67 additions & 5 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,83 @@ on:
- pyproject.toml
- uv.lock

permissions: {}

jobs:
python-ci:
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
python: ['3.13', '3.14']
uses: DigintLab/github/.github/workflows/python-ci.yml@e5faa44f33f1f621f43ab05f575c6a1f7a2872d8 # python-ci-v0.0.23
with:
python-version: ${{ matrix.python }}
env:
UV_LOCKED: '1'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
python-version: ${{ matrix.python }}
enable-cache: true
cache-suffix: python-${{ matrix.python }}
- name: Install Task
uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0
with:
repo-token: ${{ github.token }}
- name: Install dependencies
run: task install
- name: Format, lint, and type checks
run: task check
- name: Tests
run: task test
- name: Build
run: uv build

infra-scan:
name: Scan with KICS
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: KICS scan
uses: Checkmarx/kics-github-action@4a16c2130b02104dc2624c133d5224080e7cc49b # v2.2.1
with:
path: .
output_path: kics_results.sarif
output_formats: sarif
fail_on: high,medium
token: ${{ github.token }}
enable_comments: true
enable_annotations: true
enable_jobs_summary: true
comments_with_queries: true

actions-scan:
name: GitHub Actions security analysis
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
security-events: write
uses: DigintLab/github/.github/workflows/infra-security-scan.yml@e5faa44f33f1f621f43ab05f575c6a1f7a2872d8 # infra-scan-v0.0.24
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: reviewdog/action-actionlint@ae857e78c1b42b3d0a49637181b09d3d56d402b4 # v1.84.1
continue-on-error: true
with:
fail_level: any
filter_mode: nofilter
tool_name: actionlint
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
- name: Run zizmor
run: uvx zizmor@1.32.0 --offline --format github .