forked from eclipse-tractusx/sldt-semantic-models
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.79 KB
/
generate-artifacts.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
#######################################################################
# 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: Generate Model Artifacts
on:
push:
branches:
- main
jobs:
generate-model-artifacts:
name: 02 Generate model artifacts
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Changes
id: changes
uses: Ana06/[email protected]
with:
format: csv
filter: "*.ttl"
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '17'
- name: Generate artifacts for new models
run: |
mapfile -d ',' -t added_modified_files < <(printf '%s,' '${{ steps.changes.outputs.added_modified }}')
for added_modified_file in "${added_modified_files[@]}"; do
echo "Generate model artifacts for ${added_modified_file}."
./generate.sh ${added_modified_file}
git add $(dirname "${added_modified_file}")
done
- name: Commit new artifacts
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
git commit -a -m "Adding auto-generated artifacts for new models"
git push