-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: testing message output for conditional job handling
- Loading branch information
1 parent
6080082
commit b5cc979
Showing
2 changed files
with
22 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ on: | |
# - cron: '5 5 * * 1' | ||
|
||
jobs: | ||
downloadSchema: | ||
checkForApiUpdates: | ||
name: Check for API updates | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Node | ||
|
@@ -25,11 +26,10 @@ jobs: | |
uses: actions/checkout@v3 | ||
|
||
- name: Check for schema updates | ||
run: ls scripts | ||
run: ls scripts && npm install yaml | ||
|
||
- name: Download artifact | ||
uses: actions/github-script@v6 | ||
# continue-on-error: true | ||
env: | ||
WORKFLOW_FILENAME: graphql-schema.yml | ||
ARTIFACT_NAME: schema | ||
|
@@ -63,19 +63,19 @@ jobs: | |
- name: Send report to Slack | ||
id: slack | ||
if: ${{ always() }} | ||
if: ${{ steps.schema-diff.outputs.new_endpoints != '' }} | ||
uses: slackapi/[email protected] | ||
with: | ||
# Uses Slack's Block Kit to build the message | ||
# "New Relic Client Go | NerdGraph API Report", | ||
# https://app.slack.com/block-kit-builder | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "🔎 *NerdGraph API Updates:*" | ||
"text": "🔎 *New Relic Client Go | NerdGraph API Report*" | ||
} | ||
}, | ||
{ | ||
|
@@ -93,41 +93,16 @@ jobs: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | ||
|
||
# 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 | ||
# After reporting changes to the schema, upload the most | ||
# recent version so we can compare on the next run. | ||
- 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 |
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