Generate API #529
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
name: Generate API | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
inputs: | |
forceGenerate: | |
description: 'Force generate all api info' | |
default: '0' | |
required: true | |
push: | |
branches: | |
- master | |
paths: | |
- version.txt | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: shopware | |
MYSQL_DATABASE: shopware | |
ports: | |
- '3306:3306' | |
steps: | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.4' | |
- name: Clone api-doc | |
uses: actions/checkout@v2 | |
- name: Dump Info | |
run: | | |
php generate-api-info.php | |
env: | |
FORCE_GENERATE: ${{ inputs.forceGenerate }} | |
- uses: EndBug/add-and-commit@v4 | |
with: | |
add: '.' | |
author_name: Frosh Automation | |
author_email: [email protected] | |
message: 'chore: Updated Swagger definitions' | |
env: | |
GITHUB_TOKEN: ${{ secrets.FROSH_CI_TOKEN }} |