-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (62 loc) · 2.37 KB
/
updateSDKQueries.yml
File metadata and controls
75 lines (62 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
on:
workflow_dispatch:
name: Update SDK queries
jobs:
updateQueries:
runs-on: ubuntu-latest
steps:
- uses: tibdex/github-app-token@32691ba7c9e7063bd457bd8f2a5703138591fa58 # v1
id: generate-token
with:
app_id: ${{ secrets.PR_APP_ID }}
private_key: ${{ secrets.PR_APP_PRIVATE_KEY }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
path: graphql-queries
repository: fragment-dev/graphql-queries
token: ${{ steps.generate-token.outputs.token }}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
name: Checkout node-client
with:
path: node-client
- name: Enable Corepack
run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-check-release-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-check-release
- name: Use Node.js 20.x
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: 20.x
- name: Install dependencies
working-directory: ./node-client
run: yarn
- name: Install Fragment CLI
run: npm install -g @fragment-dev/cli
- name: Copy queries.graphql
working-directory: ./node-client
run: |
cp ../graphql-queries/queries.graphql src/queries/queries.graphql
- name: Build
working-directory: ./node-client
run: yarn build
- name: Update test schema
working-directory: ./node-client
run: yarn update-test-schema
- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # vr
with:
path: ./node-client
token: ${{ steps.generate-token.outputs.token }}
commit-message: "Update Node SDK queries"
title: "Update Node SDK queries"
base: "dev"
branch: update-sdk-queries/${{ github.run_id }}
body: >
This PR is auto-generated by github action.