fix(ci): use curl to install uv for Gitea compatibility
This commit is contained in:
@@ -12,19 +12,22 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v4
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
|
||||||
|
- name: Add uv to PATH
|
||||||
|
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
run: uv python install 3.12
|
run: $HOME/.local/bin/uv python install 3.12
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync
|
run: $HOME/.local/bin/uv sync
|
||||||
|
|
||||||
- name: Install FFmpeg
|
- name: Install FFmpeg
|
||||||
run: sudo apt-get update && sudo apt-get install -y ffmpeg
|
run: sudo apt-get update && sudo apt-get install -y ffmpeg
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest tests/ -v --ignore=tests/test_integration.py
|
run: $HOME/.local/bin/uv run pytest tests/ -v --ignore=tests/test_integration.py
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: test
|
needs: test
|
||||||
@@ -32,18 +35,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: version
|
id: version
|
||||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
uses: docker/build-push-action@v6
|
run: |
|
||||||
with:
|
docker build -t ffmpeg-worker:${{ steps.version.outputs.VERSION }} .
|
||||||
context: .
|
docker tag ffmpeg-worker:${{ steps.version.outputs.VERSION }} ffmpeg-worker:latest
|
||||||
push: false
|
|
||||||
tags: |
|
- name: List images
|
||||||
ffmpeg-worker:${{ steps.version.outputs.VERSION }}
|
run: docker images | grep ffmpeg-worker
|
||||||
ffmpeg-worker:latest
|
|
||||||
|
|||||||
Reference in New Issue
Block a user