Update ghcr.io/astral-sh/uv Docker tag to v0.9.27 (#232) #405
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: pre-commit | |
| env: | |
| # yamllint disable-line rule:line-length | |
| TEMPLATE_URL: "https://github.com/lincolnloop/django-layout/zipball/${{ github.ref_name }}" | |
| "on": | |
| push: | |
| concurrency: | |
| # Abort pending builds if there's an update. | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Run pre-commit on repo source. | |
| pre-commit-source: | |
| runs-on: ubuntu-latest | |
| env: | |
| PROJECT_NAME: project_name | |
| steps: | |
| - uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7 | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
| # Run pre-commit on generated project to ensure validity. | |
| pre-commit-build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@61cb8a9741eeb8a550a1b8544337180c0fc8476b # v7 | |
| with: | |
| enable-cache: false | |
| ignore-empty-workdir: true | |
| - name: django-admin startproject | |
| run: | | |
| uv run --with django django-admin startproject \ | |
| --template="$TEMPLATE_URL" \ | |
| --extension=py,md,gitignore,yaml,json,toml \ | |
| --name=Makefile,Dockerfile \ | |
| --exclude=.github \ | |
| testproj . | |
| - name: Init a git repo & add files | |
| run: git init && git add . | |
| - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 |