Added extension sample merging

This commit is contained in:
Hugo Bernier 2023-08-05 17:28:22 -04:00 committed by GitHub
parent b62206e40b
commit 841b3e5cde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,9 @@
name: Merge sample metadata
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
push:
branches:
# When someone push to `main` branch
@ -28,9 +31,15 @@ jobs:
with:
ref: Docs
path: Docs
- name: Download Extension samples
run: |
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3.raw" \
-o ./main/.metadata/extension-samples.json \
https://raw.githubusercontent.com/pnp/sp-dev-fx-extensions/main/.metadata/extension-samples.json
- name: Join samples
run: |
jq -s '[.[][]]' ./main/samples/**/assets/sample.json > ./Docs/docs/samples.json
jq -s '[.[][]]' ./main/samples/**/assets/sample.json ./main/.metadata/extension-samples.json > ./Docs/docs/samples.json
- name: Validate JSON
uses: docker://orrosenblatt/validate-json-action:latest
env:

View File

@ -0,0 +1 @@
[]