Skip to content

Commit

Permalink
Changed validation step
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscarrollsmith committed Sep 26, 2023
1 parent 8fdd1c4 commit d96d3a4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
with:
feed_url: "https://knowledgeworkersguide.substack.com/feed"

- name: Write Output to File
run: echo "${{ steps.test-action.outputs.feed }}" > feed_output.json

- name: Validate Output is JSON
id: validate-json
run: jq empty feed_output.json

- name: Validate JSON structure
run: |
const obj = JSON.parse("${{ steps.test-action.outputs.feed }}");
if (!obj || !obj.rss || !obj.rss.$) {
console.error('Invalid object');
process.exit(1);
}

0 comments on commit d96d3a4

Please sign in to comment.