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 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:

View File

@ -0,0 +1 @@
[]