Skip to content

Hourly API Sync

Hourly API Sync #8

Workflow file for this run

name: Hourly API Sync
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: |
docker run --rm -v ${{ github.workspace }}:/local openapitools/openapi-generator-cli generate \
-i https://api.darkstone.de/v3/api-docs \
-g java \
-o /local \
--skip-validate-spec \
--global-property apiTests=false,modelTests=false,apiDocs=false,modelDocs=false \
--additional-properties=generateSupportingFiles=true
- run: |
git config user.name "bot"
git config user.email "bot@darkstone.de"
rm -rf .github/workflows/maven.yml .travis.yml # Sicherungskopie löschen, falls doch generiert
git add .
git commit -m "chore(api): auto-update" && git push || true