Skip to content

chore(deps): update astral-sh/setup-uv digest to 1edb525 (#126) #338

chore(deps): update astral-sh/setup-uv digest to 1edb525 (#126)

chore(deps): update astral-sh/setup-uv digest to 1edb525 (#126) #338

Workflow file for this run

name: ci
on:
push:
branches: [main]
tags: ["**"]
pull_request:
branches: [main]
merge_group:
branches: [main]
workflow_call:
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}
jobs:
python:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [3.12]
runs-on: ${{ matrix.os }}
env:
ENVIRONMENT: ci
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: astral-sh/setup-uv@1edb52594c857e2b5b13128931090f0640537287 # v5
- id: setup-python
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
with:
python-version: ${{ matrix.python }}
- name: Set up environment
if: ${{ runner.os != 'Windows' }}
run: |
mkdir -p .venv
echo "$(realpath .venv)/bin" >> "${GITHUB_PATH}"
- name: Set up environment (Windows)
if: ${{ runner.os == 'Windows' }}
run: |
New-Item -Type Directory -Force .venv
"$(Resolve-Path .venv)/Scripts" | Out-File -FilePath "${env:GITHUB_PATH}" -Append
- run: uv sync
- run: make lint test
docker:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
env:
GHCR_IMAGE_NAME: ghcr.io/${{ github.repository }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
sparse-checkout: |
Dockerfile
uv.lock
- uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
with:
path: |
var-cache-apt
root-cache-pip
root-cache-uv
key: buildkit-mounts-${{ runner.os }}-${{ hashFiles('**/Dockerfile', '**/*.lock') }}
restore-keys: |
buildkit-mounts-${{ runner.os }}
buildkit-mounts-${{ runner.os }}
- uses: reproducible-containers/buildkit-cache-dance@5b6db76d1da5c8b307d5d2e0706d266521b710de # v3
with:
cache-map: |
{
"var-cache-apt": "/var/cache/apt",
"var-lib-apt": "/var/lib/apt",
"root-cache-pip": "/root/.cache/pip",
"root-cache-uv": "/root/.cache/uv"
}
- uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3
- id: build-ci
env:
ENVIRONMENT: ci
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6
with:
target: ${{ env.ENVIRONMENT }}
cache-from: |
${{ env.GHCR_IMAGE_NAME }}:dev
${{ env.GHCR_IMAGE_NAME }}:cache
load: true
- run: docker run --rm ${{ steps.build-ci.outputs.imageid }}
- id: docker_metadata
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
with:
images: ${{ env.GHCR_IMAGE_NAME }}
- if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- if: ${{ github.event_name != 'pull_request' }}
env:
ENVIRONMENT: dev
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6
with:
target: ${{ env.ENVIRONMENT }}
cache-from: |
${{ env.GHCR_IMAGE_NAME }}:dev
${{ env.GHCR_IMAGE_NAME }}:cache
cache-to: type=inline
tags: ${{ env.GHCR_IMAGE_NAME }}:dev
push: ${{ github.event_name != 'pull_request' }}
- if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6
with:
cache-from: |
${{ env.GHCR_IMAGE_NAME }}:dev
${{ env.GHCR_IMAGE_NAME }}:cache
cache-to: type=registry,ref=${{ env.GHCR_IMAGE_NAME }}:cache,mode=max
tags: ${{ steps.docker_metadata.outputs.tags }}
labels: ${{ steps.docker_metadata.outputs.labels }}
annotations: ${{ steps.docker_metadata.outputs.annotations }}
push: ${{ github.event_name != 'pull_request' }}
env:
ENVIRONMENT: prod