-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to get the scheme using github actions
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.