Skip to content

Commit

Permalink
Attempt to get the scheme using github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Syer10 committed Mar 29, 2024
1 parent b93c96a commit ec2cf6d
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/Scheme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Scheme

on:
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Scheme:
name: Scheme
runs-on: ubuntu-latest

steps:
- name: Clone repo
uses: actions/checkout@v3

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
architecture: x64

- name: Set up gradle
uses: gradle/actions/setup-gradle@v3

- name: Build Suwayomi-Server
run: ./gradlew desktop:copyTachidesk

- name: Build Suwayomi-Server
run: |
# Run the JAR file
java -jar desktop/src/main/resources/Tachidesk.jar &
# Capture the PID of the Java process
pid=$!
# Wait for 'Server Started' message
while true; do
if grep -q "Server started successfully" <(tail -n 5 output.log); then
break
fi
sleep 1
done
# Query the GraphQL endpoint and save the result to a file
curl -s http://localhost:4567/api/graphql > graphql/scheme.graphql
# Kill the Java process
kill $pid
- name: Commit library changes
uses: EndBug/add-and-commit@v9
with:
message: Update Scheme
push: false

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
Empty file added graphql/.gitkeep
Empty file.

0 comments on commit ec2cf6d

Please sign in to comment.