From 103e101a7f6523000a0e5c058c1a9afee0d65103 Mon Sep 17 00:00:00 2001 From: Maciej Rymarz Date: Fri, 17 Jan 2025 12:55:12 +0100 Subject: [PATCH] WIP --- .github/workflows/swagger.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/swagger.yml b/.github/workflows/swagger.yml index a5801c0..2bc3d9d 100644 --- a/.github/workflows/swagger.yml +++ b/.github/workflows/swagger.yml @@ -1,9 +1,11 @@ name: Generate Swagger Documentation -on: - push: - branches: - - main +#on: +# push: +# branches: +# - main + +on: [pull_request] jobs: swagger-gh-pages: @@ -11,6 +13,18 @@ jobs: container: image: escolalms/php:8.2 + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: database + MYSQL_PASSWORD: password + MYSQL_USER: username + ports: + - 33306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: - name: Instantiate package uses: actions/checkout@v2 @@ -35,6 +49,8 @@ jobs: - name: Generate Swagger UI uses: Legion2/swagger-ui-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: output: swagger-ui spec-file: openapi.json