Update SDK queries #6
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
on: | |
workflow_dispatch: | |
name: Update SDK queries | |
jobs: | |
updateQueries: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: graphql-queries | |
repository: fragment-dev/graphql-queries | |
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
name: Checkout node-client | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT | |
- 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/cache@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@v4 | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: yarn | |
- name: Copy queries.graphql | |
run: | | |
cp ../graphql-queries/queries.graphql src/queries/queries.graphql | |
- name: Build | |
run: yarn build | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
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. |