123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- name: openapi
- on:
- push:
- branches:
- - master
- jobs:
- build_and_deref_json:
- runs-on: ubuntu-20.04
- timeout-minutes: 90
- strategy:
- matrix:
- python-version: [3.8.12]
- steps:
- - name: Getsentry Token
- id: getsentry
- uses: getsentry/action-github-app-token@v1
- with:
- app_id: ${{ secrets.SENTRY_INTERNAL_APP_ID }}
- private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }}
- - uses: actions/checkout@v2
- with:
- # Avoid codecov error message related to SHA resolution:
- # https://github.com/codecov/codecov-bash/blob/7100762afbc822b91806a6574658129fe0d23a7d/codecov#L891
- fetch-depth: '2'
- - name: Check for python file changes
- uses: getsentry/paths-filter@v2
- id: changes
- with:
- token: ${{ github.token }}
- filters: .github/file-filters.yml
- - name: Setup sentry env (python ${{ matrix.python-version }})
- uses: ./.github/actions/setup-sentry
- if: steps.changes.outputs.api_docs == 'true'
- id: setup
- with:
- python-version: ${{ matrix.python-version }}
- pip-cache-version: ${{ secrets.PIP_CACHE_VERSION }}
- - name: Checkout getsentry/sentry-api-schema
- if: steps.changes.outputs.api_docs == 'true'
- uses: actions/checkout@v2
- with:
- ref: 'main'
- repository: getsentry/sentry-api-schema
- path: sentry-api-schema
- token: ${{ steps.getsentry.outputs.token }}
- - name: Install/setup node
- if: steps.changes.outputs.api_docs == 'true'
- uses: volta-cli/action@v1
- - name: Build OpenAPI Derefed JSON
- if: steps.changes.outputs.api_docs == 'true'
- run: |
- make build-api-docs
- - name: Copy artifact into getsentry/sentry-api-schema
- if: steps.changes.outputs.api_docs == 'true'
- run: |
- cp tests/apidocs/openapi-derefed.json sentry-api-schema
- - name: Git Commit & Push
- uses: stefanzweifel/git-auto-commit-action@5804e42f86b1891093b151b6c4e78e759c746c4d
- if: steps.changes.outputs.api_docs == 'true'
- with:
- repository: sentry-api-schema
- branch: main
- commit_message: Generated
- commit_user_email: bot@getsentry.com
- commit_user_name: openapi-getsentry-bot
|