data-models-update #229
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Data Model | |
on: | |
workflow_dispatch: | |
repository_dispatch: | |
types: [data-models-update] | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout OpenActive.NET | |
uses: actions/checkout@v2 | |
with: | |
ref: master | |
path: OpenActive.NET | |
- 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 .NET models generator | |
run: npm start -- generate .NET --destination ../OpenActive.NET/OpenActive.NET/ | |
working-directory: ./models-lib/ | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
path: ./OpenActive.NET/ | |
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 .NET 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 }}" |