-
Notifications
You must be signed in to change notification settings - Fork 95
81 lines (69 loc) · 2.16 KB
/
graphql-schema.yml
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
76
77
78
79
80
81
name: NerdGraph Schema Diff
on:
workflow_dispatch:
pull_request:
branches: [main]
# schedule:
# - cron: '5 5 * * 1'
jobs:
downloadSchema:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check for schema updates
run: ls scripts
- name: Download artifact
uses: actions/github-script@v6
# continue-on-error: true
env:
WORKFLOW_FILENAME: graphql-schema.yml
ARTIFACT_NAME: schema
ARTIFACT_FILENAME: schema.zip
UNZIP_DIR: ./
with:
script: |
const script = require('./scripts/download-previous-artifact.js')
await script({github, context, core})
# - name: Download schema artifact
# uses: actions/download-artifact@v4
# with:
# name: schema
# path: ./
# - name: Rename schema.json to schema-old.json
# run: |
# find ./ -type f -name "schema.json"
# mv schema.json schema-old.json
# uploadSchema:
# 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
# - 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