Added extension sample merging
This commit is contained in:
parent
b62206e40b
commit
841b3e5cde
|
@ -1,6 +1,9 @@
|
||||||
name: Merge sample metadata
|
name: Merge sample metadata
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
# When someone push to `main` branch
|
# When someone push to `main` branch
|
||||||
|
@ -28,9 +31,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ref: Docs
|
ref: Docs
|
||||||
path: 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
|
- name: Join samples
|
||||||
run: |
|
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
|
- name: Validate JSON
|
||||||
uses: docker://orrosenblatt/validate-json-action:latest
|
uses: docker://orrosenblatt/validate-json-action:latest
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
[]
|
Loading…
Reference in New Issue