-
Notifications
You must be signed in to change notification settings - Fork 10
57 lines (49 loc) · 1.63 KB
/
base_schema.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Update Store API
on:
workflow_dispatch:
schedule:
- cron: 0 8 */1 * *
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
generate-schema:
uses: shopware/docs-ci/.github/workflows/generate_schema.yml@main
with:
schema_flags: --store-api
schema_file: storeapi.json
secrets: inherit
open-pr:
name: "Open a pull request"
runs-on: ubuntu-latest
needs: [generate-schema]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: download api schema
uses: actions/download-artifact@v3
with:
name: ${{needs.generate-schema.outputs.api_schema}}
- name: install yq
uses: cachix/install-nix-action@v18
- name: Add custom descriptions
run: |
for k in $(yq '. | keys | .[]' descriptions.yml); do
newDescription=$(yq ".\"$k\"" descriptions.yml);
# Indent 4; output as json; edit in place
yq -I 4 -o json -i "$k.description = \"${newDescription}\"" storeapi.json
done
- name: Prettify
run: |
sudo apt-get update
sudo apt-get install -y moreutils
jq . storeapi.json | sponge storeapi.json
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
add-paths: storeapi.json
author: shopwareBot <[email protected]>
committer: shopwareBot <[email protected]>
assignees: sushmangupta, Isengo1989, bojanrajh
branch: schema-update
delete-branch: true
title: 'Update store API schema'