Skip to content

Generate API

Generate API #554

Workflow file for this run

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
- fix-apidoc
paths:
- version.txt
jobs:
build:
runs-on: ubuntu-latest
env:
APP_ENV: dev
APP_URL: http://localhost:8000
DATABASE_URL: mysql://root:[email protected]/shopware
steps:
- name: Start MySQL
shell: bash
run: |
sudo mv /var/lib/mysql /var/lib/mysql-old
sudo mkdir /var/lib/mysql
sudo mount -t tmpfs tmpfs /var/lib/mysql -o size=1G
sudo -u mysql mysqld --datadir=/var/lib/mysql --default-time-zone=SYSTEM --initialize-insecure
sudo systemctl start mysql
- name: Clone Shopware
uses: actions/checkout@v3
with:
path: shopware
repository: shopware/platform
fetch-depth: 0
- name: Install Shopware
working-directory: shopware
run: |
rm -rf vendor-bin
composer install
php bin/console system:install --basic-setup --create-database --force
- name: Clone api-doc
uses: actions/checkout@v3
- name: Dump Info
run: |
php generate-api-info.php
env:
FORCE_GENERATE: ${{ inputs.forceGenerate }}
- uses: EndBug/add-and-commit@v4
with:
add: '.'
cwd: 'api-doc'
author_name: Frosh Automation
author_email: [email protected]
message: 'chore: Updated Swagger definitions'
env:
GITHUB_TOKEN: ${{ secrets.FROSH_CI_TOKEN }}