Skip to content

build and run

build and run #83

Workflow file for this run

name: build and run
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight (beginning of the day)
workflow_dispatch: # Manual trigger
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
- name: Set up Gradle
uses: gradle/wrapper-validation-action@v2
- name: Set execute permission on Gradle wrapper
run: chmod +x gradlew
- name: Clean and build project with Gradle
run: ./gradlew clean shadowJar
- name: Run ZPlexSync
run: java -jar build/libs/*.jar
env:
GOOGLE_DRIVE_CLIENT_EMAIL: ${{ secrets.GOOGLE_DRIVE_CLIENT_EMAIL }}
GOOGLE_DRIVE_CLIENT_ID: ${{ secrets.GOOGLE_DRIVE_CLIENT_ID }}
GOOGLE_DRIVE_PRIVATE_KEY_ID: ${{ secrets.GOOGLE_DRIVE_PRIVATE_KEY_ID }}
GOOGLE_DRIVE_PRIVATE_KEY_PKCS8: ${{ secrets.GOOGLE_DRIVE_PRIVATE_KEY_PKCS8 }}
MOVIES_FOLDER: ${{ secrets.MOVIES_FOLDER }}
SHOWS_FOLDER: ${{ secrets.SHOWS_FOLDER }}
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
ZPLEX_DATABASE_URL: ${{ secrets.ZPLEX_DATABASE_URL }}