Use docker on CI
This commit is contained in:
parent
d75e69249b
commit
46684402e6
@ -15,15 +15,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
container:
|
||||||
|
image: gitea.tourolle.paris/dtourolle/srfplay-builder:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Verify .NET installation
|
|
||||||
run: dotnet --version
|
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore Jellyfin.Plugin.SRFPlay.sln
|
run: dotnet restore Jellyfin.Plugin.SRFPlay.sln
|
||||||
|
|
||||||
@ -33,21 +32,11 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: dotnet test Jellyfin.Plugin.SRFPlay.sln --no-build --configuration Release --verbosity normal
|
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
|
- name: Build Jellyfin Plugin
|
||||||
id: jprm
|
id: jprm
|
||||||
run: |
|
run: |
|
||||||
# Create artifacts directory for JPRM output
|
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
|
jprm --verbosity=debug plugin build .
|
||||||
# Build plugin using JPRM
|
|
||||||
/tmp/jprm-venv/bin/jprm --verbosity=debug plugin build .
|
|
||||||
|
|
||||||
# Find the generated zip file
|
|
||||||
ARTIFACT=$(find . -name "*.zip" -type f -print -quit)
|
ARTIFACT=$(find . -name "*.zip" -type f -print -quit)
|
||||||
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
||||||
echo "Found artifact: ${ARTIFACT}"
|
echo "Found artifact: ${ARTIFACT}"
|
||||||
|
|||||||
@ -13,15 +13,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-release:
|
build-and-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
container:
|
||||||
|
image: gitea.tourolle.paris/dtourolle/srfplay-builder:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Verify .NET installation
|
|
||||||
run: dotnet --version
|
|
||||||
|
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: get_version
|
id: get_version
|
||||||
run: |
|
run: |
|
||||||
@ -49,21 +48,11 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: dotnet test Jellyfin.Plugin.SRFPlay.sln --no-build --configuration Release --verbosity normal
|
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
|
- name: Build Jellyfin Plugin
|
||||||
id: jprm
|
id: jprm
|
||||||
run: |
|
run: |
|
||||||
# Create artifacts directory for JPRM output
|
|
||||||
mkdir -p artifacts
|
mkdir -p artifacts
|
||||||
|
jprm --verbosity=debug plugin build ./
|
||||||
# Build plugin using JPRM
|
|
||||||
/tmp/jprm-venv/bin/jprm --verbosity=debug plugin build ./
|
|
||||||
|
|
||||||
# Find the generated zip file
|
|
||||||
ARTIFACT=$(find . -name "*.zip" -type f -print -quit)
|
ARTIFACT=$(find . -name "*.zip" -type f -print -quit)
|
||||||
ARTIFACT_NAME=$(basename "${ARTIFACT}")
|
ARTIFACT_NAME=$(basename "${ARTIFACT}")
|
||||||
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
@ -17,15 +17,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
container:
|
||||||
|
image: gitea.tourolle.paris/dtourolle/srfplay-builder:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Verify .NET installation
|
|
||||||
run: dotnet --version
|
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore Jellyfin.Plugin.SRFPlay.sln
|
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