Skip to content

Generate API

Generate API #962

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
jobs:
build:
runs-on: ubuntu-latest
env:
APP_ENV: dev
APP_URL: http://localhost:8000
DATABASE_URL: mysql://[email protected]/shopware
COMPOSER_NO_AUDIT: "1"
steps:
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer global config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-6500
restore-keys: |
${{ runner.os }}-composer-
-
name: Install Shopware CLI
uses: FriendsOfShopware/shopware-cli-action@main
- name: Create Project
run: shopware-cli project create shopware 6.5.0.0
- name: Clone api-doc
uses: actions/checkout@v4
with:
path: api-doc
token: ${{ secrets.FROSH_CI_TOKEN }}
- name: Dump Info
working-directory: api-doc
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 }}