mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-13 16:40:01 +00:00
608a0b5ac1
This reverts commit 8d8dca32d8.
80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
name: Build and Push Docker Image (fix/*)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'fix/*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
checks: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v5
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '21'
|
|
|
|
- name: Run production build
|
|
env:
|
|
GAMEYFIN_KEYSTORE_PASSWORD: ${{ secrets.GAMEYFIN_KEYSTORE_PASSWORD }}
|
|
run: ./gradlew clean build -Pvaadin.productionMode=true
|
|
|
|
- name: Publish Test Report
|
|
uses: mikepenz/action-junit-report@v6
|
|
if: success() || failure() # always run even if the previous step fails
|
|
with:
|
|
report_paths: '**/build/test-results/test/TEST-*.xml'
|
|
|
|
- name: Upload build outputs
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-outputs
|
|
path: |
|
|
app/build/libs/**
|
|
plugins/**/build/libs/**/*.jar
|
|
|
|
docker:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
packages: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
variant: [ alpine, ubuntu ]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Download build outputs
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: build-outputs
|
|
path: .
|
|
|
|
- name: Extract tag from branch name
|
|
id: extract_tag
|
|
run: |
|
|
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
|
|
TAG="${BRANCH_NAME#fix/}"
|
|
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
|
|
|
- name: Build and push Docker image (${{ matrix.variant }})
|
|
uses: ./.github/actions/docker-build-push
|
|
with:
|
|
ghcr_username: ${{ github.actor }}
|
|
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
platforms: linux/arm64/v8,linux/amd64
|
|
tags: ghcr.io/gameyfin/gameyfin:${{ steps.extract_tag.outputs.tag }}
|
|
variant: ${{ matrix.variant }}
|