Skip to content

build(uv): Bump the uv group across 1 directory with 2 updates #1833

build(uv): Bump the uv group across 1 directory with 2 updates

build(uv): Bump the uv group across 1 directory with 2 updates #1833

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:
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [3.12]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
ENVIRONMENT: ci
UV_LOCKED: 1
UV_NO_SYNC: 1
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7
- id: setup-python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
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 && uv pip list
- run: make lint test
docker:
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
env:
GHCR_IMAGE_NAME: ghcr.io/${{ github.repository }}
steps:
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- id: build-ci
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
target: ${{ env.ENVIRONMENT }}
cache-from: ${{ env.GHCR_IMAGE_NAME }}:cache
load: true
env:
ENVIRONMENT: ci
- run: docker run "${IMAGE_ID}" uv pip list
env:
IMAGE_ID: ${{ steps.build-ci.outputs.imageid }}
- run: docker run "${IMAGE_ID}"
env:
IMAGE_ID: ${{ steps.build-ci.outputs.imageid }}
- id: docker_metadata
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
with:
images: ${{ env.GHCR_IMAGE_NAME }}
- if: ${{ github.event_name == 'push' || github.ref_name == github.event.repository.default_branch }}
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- if: ${{ github.event_name == 'push' || github.ref_name == github.event.repository.default_branch }}
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
target: ${{ env.ENVIRONMENT }}
cache-from: ${{ env.GHCR_IMAGE_NAME }}:cache
cache-to: type=inline
tags: ${{ env.GHCR_IMAGE_NAME }}:dev
push: ${{ github.event_name == 'push' || github.ref_name == github.event.repository.default_branch }}
env:
ENVIRONMENT: dev
- if: ${{ github.event_name == 'push' || github.ref_name == github.event.repository.default_branch }}
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
with:
cache-from: ${{ 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 == 'push' || github.ref_name == github.event.repository.default_branch }}
env:
ENVIRONMENT: prod