Skip to content

Update SDK queries

Update SDK queries #7

on:
workflow_dispatch:
name: Update SDK queries
jobs:
updateQueries:
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.PR_APP_ID }}
private_key: ${{ secrets.PR_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
path: graphql-queries
repository: fragment-dev/graphql-queries
token: ${{ steps.generate-token.outputs.token }}
- uses: actions/checkout@v4
name: Checkout fragment-python
with:
path: fragment-python
- name: Use Python 3.10.13
uses: actions/setup-python@v5
with:
python-version: '3.10.13'
- name: Install dependencies
working-directory: ./fragment-python
run: |
pip install poetry
poetry install --with dev
- name: Copy queries.graphql
working-directory: ./fragment-python
run: |
mkdir queries
cp ../graphql-queries/queries.graphql fragment/std_queries/queries.graphql
- name: Generate SDK
working-directory: ./fragment-python
run: |
make build
make lint
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
path: ./fragment-python
token: ${{ steps.generate-token.outputs.token }}
commit-message: 'Update Python SDK queries'
title: 'Update Python SDK queries'
base: 'dev'
branch: update-sdk-queries/${{ github.run_id }}
body: >
This PR is auto-generated by github action.