-
Notifications
You must be signed in to change notification settings - Fork 37
75 lines (65 loc) · 2.4 KB
/
buildMain.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
name: CI
on:
push:
branches: [ main ]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
default: '--debug'
jobs:
setup-matrix:
runs-on: ubuntu-latest
steps:
- name: Checkout playbooks
uses: actions/checkout@v2
with:
repository: devonfw-tutorials/tutorials
path: playbooks
- name: Setup matrix combinations
id: setup-matrix-combinations
run: |
cd playbooks
for dir in */; do MATRIX_PARAMS_COMBINATIONS=$MATRIX_PARAMS_COMBINATIONS'{"tutorial": "'${dir::-1}'"},'; done
echo ::set-output name=matrix-combinations::{\"include\":[$MATRIX_PARAMS_COMBINATIONS]}
outputs:
matrix-combinations: ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }}
build_main:
runs-on: ubuntu-latest
needs: setup-matrix
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix-combinations) }}
steps:
- name: Checkout tutorial-compiler
uses: actions/checkout@v2
with:
repository: devonfw-tutorials/tutorial-compiler
- name: Checkout playbooks
uses: actions/checkout@v2
with:
repository: devonfw-tutorials/tutorials
path: playbooks
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: install TS
run: npm install typescript
- name: npm install
run: npm install
- name: run buildRun.sh ${{ github.event.inputs.logLevel }}
env:
# remove maven download logs as it might cause random build failures: https://stackoverflow.com/a/66801171
MAVEN_ARGS: "-Djansi.force=true -Djansi.passthrough=true -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
run: sh buildRun.sh -p ${{ matrix.tutorial }} ${{ github.event.inputs.logLevel }}
- name: Multiple Repositories Dispatcher
uses: guilouro/[email protected]
with:
repo_token: ${{ secrets.REPO_ACCESS_TOKEN }}
event_type: dispatch-katacoda-scenarios
repositories: |
devonfw-tutorials/wiki-tutorials
devonfw-tutorials/katacoda-scenarios
client_payload: '{"tutorial": "${{ matrix.tutorial }}"}'