schema #1502
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: schema | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
checks: write | |
pull-requests: write | |
jobs: | |
schema: | |
name: Schema | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Use node 18 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Install dependencies | |
run: yarn | |
- name: Update schema | |
run: yarn update:schema | |
- name: Build packages | |
run: yarn build | |
- name: Run tests | |
run: yarn test | |
- name: Compare schema for changes | |
uses: kamilkisiela/graphql-inspector@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
schema: "master:packages/sdk/src/schema.graphql" | |
fail-on-breaking: false | |
- name: Create schema pull request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: "feat(sdk): update schema" | |
title: "feat(sdk): update schema" | |
body: "Update schema, regenerate types and SDK" | |
branch: schema | |
base: master |