Skip to content

Update yml - remove comment #11

Update yml - remove comment

Update yml - remove comment #11

Workflow file for this run

name: Update OpenAPI Schema
on:
push:
paths:
- 'server/**'
pull_request:
paths:
- 'server/**'
branches:
- main
jobs:
update-schema:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.5'
- name: Install dependencies with Pipenv
run: |
pip install pipenv
pipenv install --dev
working-directory: ./server
- name: Generate OpenAPI Schema
run: |
pipenv run python manage.py spectacular --color --file schema.yml
working-directory: ./server
env:
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
- name: "check is DJANGO_SECRET_KEY exists"
env:
super_secret: ${{ secrets.DJANGO_SECRET_KEY }}
if: ${{ env.super_secret == '' }}
run: 'echo "echo the secret \"DJANGO_SECRET_KEY\" has not been made; echo please go to \"settings \> secrets \> actions\" to create it"

Check failure on line 44 in .github/workflows/update_schema.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update_schema.yml

Invalid workflow file

You have an error in your yaml syntax on line 44
- name: Commit and push schema file if there are changes
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git diff --exit-code schema.yml || (
git status &&
git add schema.yml &&
git commit -m "Update OpenAPI schema" &&
git push origin HEAD:${{ github.head_ref }}
)
working-directory: ./server