Use docker on CI
This commit is contained in:
parent
d75e69249b
commit
46684402e6
@ -15,15 +15,14 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: gitea.tourolle.paris/dtourolle/srfplay-builder:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Verify .NET installation
|
||||
run: dotnet --version
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore Jellyfin.Plugin.SRFPlay.sln
|
||||
|
||||
@ -33,21 +32,11 @@ jobs:
|
||||
- name: Run tests
|
||||
run: dotnet test Jellyfin.Plugin.SRFPlay.sln --no-build --configuration Release --verbosity normal
|
||||
|
||||
- name: Install JPRM
|
||||
run: |
|
||||
python3 -m venv /tmp/jprm-venv
|
||||
/tmp/jprm-venv/bin/pip install jprm
|
||||
|
||||
- name: Build Jellyfin Plugin
|
||||
id: jprm
|
||||
run: |
|
||||
# Create artifacts directory for JPRM output
|
||||
mkdir -p artifacts
|
||||
|
||||
# Build plugin using JPRM
|
||||
/tmp/jprm-venv/bin/jprm --verbosity=debug plugin build .
|
||||
|
||||
# Find the generated zip file
|
||||
jprm --verbosity=debug plugin build .
|
||||
ARTIFACT=$(find . -name "*.zip" -type f -print -quit)
|
||||
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
||||
echo "Found artifact: ${ARTIFACT}"
|
||||
|
||||
@ -13,15 +13,14 @@ on:
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: gitea.tourolle.paris/dtourolle/srfplay-builder:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Verify .NET installation
|
||||
run: dotnet --version
|
||||
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: |
|
||||
@ -49,21 +48,11 @@ jobs:
|
||||
- name: Run tests
|
||||
run: dotnet test Jellyfin.Plugin.SRFPlay.sln --no-build --configuration Release --verbosity normal
|
||||
|
||||
- name: Install JPRM
|
||||
run: |
|
||||
python3 -m venv /tmp/jprm-venv
|
||||
/tmp/jprm-venv/bin/pip install jprm
|
||||
|
||||
- name: Build Jellyfin Plugin
|
||||
id: jprm
|
||||
run: |
|
||||
# Create artifacts directory for JPRM output
|
||||
mkdir -p artifacts
|
||||
|
||||
# Build plugin using JPRM
|
||||
/tmp/jprm-venv/bin/jprm --verbosity=debug plugin build ./
|
||||
|
||||
# Find the generated zip file
|
||||
jprm --verbosity=debug plugin build ./
|
||||
ARTIFACT=$(find . -name "*.zip" -type f -print -quit)
|
||||
ARTIFACT_NAME=$(basename "${ARTIFACT}")
|
||||
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
||||
|
||||
@ -17,15 +17,14 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
image: gitea.tourolle.paris/dtourolle/srfplay-builder:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Verify .NET installation
|
||||
run: dotnet --version
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore Jellyfin.Plugin.SRFPlay.sln
|
||||
|
||||
|
||||
17
Dockerfile.builder
Normal file
17
Dockerfile.builder
Normal file
@ -0,0 +1,17 @@
|
||||
# SRFPlay Builder Image
|
||||
# Pre-built image with .NET SDK and JPRM for building Jellyfin plugins
|
||||
# Build: docker build -f Dockerfile.builder -t gitea.tourolle.paris/dtourolle/srfplay-builder:latest .
|
||||
# Push: docker push gitea.tourolle.paris/dtourolle/srfplay-builder:latest
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3 \
|
||||
python3-pip \
|
||||
git \
|
||||
jq \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install --break-system-packages jprm
|
||||
|
||||
WORKDIR /src
|
||||
Loading…
x
Reference in New Issue
Block a user