-
Notifications
You must be signed in to change notification settings - Fork 47
95 lines (85 loc) · 2.84 KB
/
governance.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#######################################################################
# Copyright (c) 2023 Robert Bosch Manufacturing Solutions GmbH
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This work is made available under the terms of the
# Creative Commons Attribution 4.0 International (CC-BY-4.0) license,
# which is available at
# https://creativecommons.org/licenses/by/4.0/legalcode.
#
# SPDX-License-Identifier: CC-BY-4.0
#######################################################################
name: 0 Governance
on:
push:
branches:
- 'main'
pull_request:
jobs:
synchronize-models:
name: 00 Determine Target Environment
runs-on: ubuntu-latest
outputs:
ADDED: ${{ steps.changes.outputs.added }}
MODIFIED: ${{ steps.changes.outputs.modified }}
REMOVED: ${{ steps.changes.outputs.removed }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Changes
id: changes
uses: Ana06/[email protected]
with:
# Format of the steps output context.
# Can be 'space-delimited', 'csv', or 'json'.
# Default: 'space-delimited'
format: 'json'
- name: validate changes from push
if: github.event.pusher
uses: ./.github/actions/validate
with:
ADDED: ${{ steps.changes.outputs.added }}
MODIFIED: ${{ steps.changes.outputs.modified }}
REMOVED: ${{ steps.changes.outputs.removed }}
IS_MAIN: true
- name: validate changes from PR
if: github.event.pull_request
uses: ./.github/actions/validate
with:
ADDED: ${{ steps.changes.outputs.added }}
MODIFIED: ${{ steps.changes.outputs.modified }}
- name: Archive
uses: actions/upload-artifact@v3
with:
name: output
path: toArchive
validate-model-proposal:
runs-on: ubuntu-latest
if: github.event.pull_request
name: 01 Validate new semantic model
needs: synchronize-models
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install Node dependencies
working-directory: ./.github/actions/model-validation
run: npm install
- name: Validate semantic models
id: model_validation
uses: ./.github/actions/model-validation
with:
pr_number: ${{ github.event.number }}
bamm_version: 2.3.2
added: ${{needs.synchronize-models.outputs.ADDED}}
modified: ${{needs.synchronize-models.outputs.MODIFIED}}
- name: Archive
uses: actions/upload-artifact@v3
with:
name: validation-output
path: output