Skip to content

Commit

Permalink
Only run if config was changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 committed Mar 29, 2024
1 parent 51dd68d commit a9c39f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/Scheme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,23 @@ jobs:
java-version: '17'
architecture: x64

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
config:
- 'buildSrc/src/main/kotlin/Config.kt'

- name: Set up gradle
if: steps.changes.outputs.config == 'true'
uses: gradle/actions/setup-gradle@v3

- name: Build Suwayomi-Server
if: steps.changes.outputs.config == 'true'
run: ./gradlew desktop:setupTachideskJar

- name: Run Suwayomi-Server
if: steps.changes.outputs.config == 'true'
run: |
# Run the JAR file
java -jar desktop/src/main/resources/Tachidesk.jar > output.log &
Expand All @@ -54,12 +64,14 @@ jobs:
rm output.log

- name: Commit library changes
if: steps.changes.outputs.config == 'true'
uses: EndBug/add-and-commit@v9
with:
message: Update Scheme
push: false

- name: Push changes
if: steps.changes.outputs.config == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit a9c39f7

Please sign in to comment.