generated from clemEssien/Bert-Phi-Annotator
-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (60 loc) · 3.05 KB
/
update.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Update to latest NLP Sandbox version
on:
schedule:
- cron: '0 10 * * THU' # everyday at 10am
jobs:
check-and-update:
name: Check and update to the latest NLP Sandbox version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get latest NLP Sandbox schemas version
uses: octokit/[email protected]
id: get_latest_release
with:
route: GET /repos/{owner}/{repo}/releases/latest
owner: nlpsandbox
repo: nlpsandbox-schemas
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push new version to $GITHUB_ENV
run: |
new_version=${{ fromJson(steps.get_latest_release.outputs.data).tag_name }}
echo "NEW_VERSION=$(echo $new_version)" >> $GITHUB_ENV
- name: Start updating this NLP Sandbox tool
run: |
current_version=$(cat .nlpsandbox-version)
echo "${{ env.NEW_VERSION }}" > .nlpsandbox-version
- name: Send pull request to update to new version
uses: peter-evans/create-pull-request@v3
with:
title: Update to NLP Sandbox schemas ${{ env.NEW_VERSION }}
commit-message: Update to NLP Sandbox schemas ${{ env.NEW_VERSION }}
body: |
A new version of the [NLP Sandbox schemas] is available. Follow
these instructions to update your NLP Sandbox tool before checking
its performance on [NLPSandbox.io].
1. Checkout the branch behind this Pull Request.
`git checkout <branch_name>`
2. Re-run the same [openapi-generator] command you used to generate
the tool stub. If you started from an existing tool
implementation like the one included in this GitHub repository,
run the following command to update your tool to the latest
version of the [NLP Sandbox schemas] (this command would be
defined in `package.json`).
`npm run generate:server:latest`
3. Review the updates made to this tool in the [NLP Sandbox schemas
CHANGELOG].
4. Review and merge the changes. If you are using VS Code, this step
can be performed relatively easily using the section named
"Source Control". This section lists the files that have been
modified by the generator. When clicking on a file, VS Code shows
side-by-side the current and updated version of the file. Changes
can be accepted or rejected at the level of an entire file or for
a selection of lines.
5. Submit your updated tool to [NLPSandbox.io].
[openapi-generator]: https://github.com/OpenAPITools/openapi-generator
[NLP Sandbox schemas]: https://github.com/nlpsandbox/nlpsandbox-schemas
[NLP Sandbox schemas CHANGELOG]: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/main/.github/CHANGELOG.md
[NLPSandbox.io]: https://nlpsandbox.io
delete-branch: true