-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathplugin_digitalsalesroom_schema.yml
More file actions
86 lines (76 loc) · 2.99 KB
/
plugin_digitalsalesroom_schema.yml
File metadata and controls
86 lines (76 loc) · 2.99 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Update Digital Sales Room Admin API
on:
workflow_call:
inputs:
shopware_version:
description: "Shopware version"
required: true
type: string
php_version:
description: "PHP version"
required: false
type: string
env:
PLUGIN_NAME: SwagDigitalSalesRooms
PLUGIN_URL: github.com/shopware/swagdigitalsalesrooms.git
COMPOSER_PACKAGES: shopware-pwa/shopware-pwa dev-master symfony/mercure ^0.6.2 spatie/icalendar-generator ^2.5 nesbot/carbon ^3.0.0-rc.1@rc
PLUGIN_BRANCH: main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
vars:
runs-on: ubuntu-22.04
outputs:
PLUGIN_NAME: ${{ env.PLUGIN_NAME }}
PLUGIN_URL: ${{ env.PLUGIN_URL }}
COMPOSER_PACKAGES: ${{ env.COMPOSER_PACKAGES }}
PLUGIN_BRANCH: ${{ env.PLUGIN_BRANCH }}
steps:
- run: echo "Exposing env vars"
generate-schema:
needs: vars
uses: shopware/docs-ci/.github/workflows/generate_schema.yml@main
with:
schema_flags: ""
schema_file: ${{ needs.vars.outputs.PLUGIN_NAME }}-adminapi.json
plugin_name: ${{ needs.vars.outputs.PLUGIN_NAME }}
plugin_url: ${{ needs.vars.outputs.PLUGIN_URL }}
plugin_branch: ${{ needs.vars.outputs.PLUGIN_BRANCH }}
composer_packages: ${{ needs.vars.outputs.COMPOSER_PACKAGES }}
shopware_version: ${{ inputs.shopware_version }}
php_version: ${{ inputs.php_version }}
secrets: inherit
open-pr:
name: "Open a pull request"
runs-on: ubuntu-latest
needs: [generate-schema, vars]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: download api schema
uses: actions/download-artifact@v4
with:
name: ${{needs.generate-schema.outputs.api_schema}}
- name: install yq
uses: cachix/install-nix-action@v18
- name: Prettify
run: |
sudo apt-get update
sudo apt-get install -y moreutils
jq . ${{ needs.vars.outputs.PLUGIN_NAME }}-adminapi.json | sponge ${{ needs.vars.outputs.PLUGIN_NAME }}-adminapi.json
./.github/scripts/find_delta_paths.sh ${{ needs.vars.outputs.PLUGIN_NAME }}
- name: Extract summary
run: |
chmod +x ./.github/scripts/extract.sh
./.github/scripts/extract.sh ${{ needs.vars.outputs.PLUGIN_NAME }}-adminapi.json ${{ needs.vars.outputs.PLUGIN_NAME }}-adminapi.summary.json
- name: Create DSR PR
uses: peter-evans/create-pull-request@v6
with:
add-paths: |
${{ needs.vars.outputs.PLUGIN_NAME }}-adminapi.json
${{ needs.vars.outputs.PLUGIN_NAME }}-adminapi.summary.json
author: shopwareBot <example@example.com>
committer: shopwareBot <example@example.com>
assignees: Isengo1989, sushmangupta, bojanrajh
branch: ${{ needs.vars.outputs.PLUGIN_NAME }}-schema-update
delete-branch: true
title: 'Update ${{ needs.vars.outputs.PLUGIN_NAME }} admin API schema'