Hourly API Sync #8
This file contains hidden or 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
| 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 |