Skip to content

Commit

Permalink
feat(automation): [wip] add workflow for diffing the schema
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderblue committed May 8, 2024
1 parent 759467d commit 459808a
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/graphql-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: NerdGraph Schema Diff
on:
workflow_dispatch:
pull_request:
branches: [main]

# schedule:
# - cron: '5 5 * * 1'

jobs:
checkForSchemaUpdates:
runs-on: ubuntu-latest
steps:
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x

- name: Checkout code
uses: actions/checkout@v3

# - uses: actions/download-artifact@v4
# with:
# name: schema
# path: ./

# - name: List artifact downloads
# run: ls

- name: Fetch GraphQL Schema
env:
NEW_RELIC_API_KEY: ${{ secrets.NEW_RELIC_API_KEY }}
run: |
go install github.com/newrelic/tutone/cmd/tutone@latest
tutone fetch --refetch
ls
# - name: Check for schema updates
# run: ./scripts/schema-diff.js

- name: Upload latest schema.json
uses: actions/upload-artifact@v4
with:
# Duration after which artifact will expire in days. 0 means using default retention.
# Minimum 1 day.
# Maximum 90 days unless changed from the repository settings page.
retention-days: 90
name: schema
path: schema.json
if-no-files-found: error
overwrite: true

0 comments on commit 459808a

Please sign in to comment.