-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (54 loc) · 2.07 KB
/
create-data-model-pr.yaml
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
name: Update Data Model
on:
workflow_dispatch:
repository_dispatch:
types: [data-models-update]
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout models-php
uses: actions/checkout@v2
with:
ref: master
path: models-php
- name: Checkout models-lib
uses: actions/checkout@v2
with:
repository: openactive/models-lib
path: models-lib
- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install models-lib
run: npm install
working-directory: ./models-lib/
- name: Update models-lib with latest data-models
run: npm update @openactive/data-models
working-directory: ./models-lib/
- name: Run PHP models generator
run: npm start -- generate PHP --destination ../models-php/src/
working-directory: ./models-lib/
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
path: ./models-php/
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
commit-message: Update data models
committer: openactive-bot <[email protected]>
author: openactive-bot <[email protected]>
signoff: false
branch: ci/update-data-models
delete-branch: true
title: 'Update data models'
body: |
Update PHP data models to the latest version based on the [OpenActive Vocabulary](https://openactive.io/ns/) (codified by the [Data Models](https://github.com/openactive/data-models)), [Test Interface](https://openactive.io/test-interface/) and [Beta Namespace](https://openactive.io/ns-beta/).
labels: |
automated pr
draft: false
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"