-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (43 loc) · 1.68 KB
/
check_version_number.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
name: check-version-number
# See docu/Continuous Integration And_General_Tests.md for detailed information-module.
on:
pull_request:
branches:
- master
jobs:
check-version-number:
name: check-version-number
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '16'
# TODO: Check Version number of other components!
- name: Load Version of Latest Release
id: check # This will be the reference for getting the outputs.
uses: EndBug/version-check@v1
with:
file-name: ./frontend/package.json
file-url: https://raw.githubusercontent.com/wp99cp/eMeal_menuplanung/master/frontend/package.json
static-checking: localIsNew
- name: Log when unchanged
if: steps.check.outputs.changed != 'true'
run: exit 1
- name: 'Comment PR'
uses: actions/github-script@v3
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { issue: { number: issue_number }, repo: { owner, repo } } = context;
github.issues.createComment({
issue_number, owner, repo,
body: '- [X] Version changed since last release! Version of this release: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }}).'
});
github.issues.addLabels({
issue_number, owner, repo,
labels: ['upcomming release']
});
- run: exit 0