-
Notifications
You must be signed in to change notification settings - Fork 7
113 lines (100 loc) · 4.65 KB
/
daily_dev_publish.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: "Daily dev :: Publish"
on:
schedule:
- cron: "0 4 * * *" # 4am UTC everyday
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/daily_dev_publish.yml"
concurrency:
group: ${{ github.event.pull_request && format('daily-dev-publish-pr-{0}', github.event.pull_request.number) || format('daily-dev-publish-ref-{0}', github.ref_name) }}
cancel-in-progress: true
jobs:
build:
if: github.repository == 'kiegroup/serverless-logic-sandbox-deployment'
runs-on: ubuntu-latest
env:
KIE_TOOLS_BUILD__buildContainerImages: "false"
KIE_TOOLS_BUILD__runLinters: "false"
KIE_TOOLS_BUILD__runTests: "false"
KIE_TOOLS_BUILD__runEndToEndTests: "false"
DASHBUILDER__viewerImageRegistry: "docker.io"
DASHBUILDER__viewerImageAccount: "apache"
DASHBUILDER__viewerImageName: "incubator-kie-dashbuilder-viewer"
SERVERLESS_LOGIC_WEB_TOOLS__dashbuilderViewerImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageRegistry: "docker.io"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageAccount: "apache"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageName: "incubator-kie-serverless-logic-web-tools-swf-builder"
SERVERLESS_LOGIC_WEB_TOOLS__swfBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageRegistry: "docker.io"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageAccount: "apache"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageName: "incubator-kie-serverless-logic-web-tools-base-builder"
SERVERLESS_LOGIC_WEB_TOOLS__baseBuilderImageTag: "daily-dev"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageRegistry: "quay.io"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageAccount: "kubesmarts"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageName: "incubator-kie-serverless-logic-web-tools-swf-dev-mode"
SERVERLESS_LOGIC_WEB_TOOLS__swfDevModeImageTag: "main"
SERVERLESS_LOGIC_WEB_TOOLS__corsProxyUrl: "https://daily-dev-cors-proxy-kie-sandbox.rhba-0ad6762cc85bcef5745bb684498c2436-0000.us-south.containers.appdomain.cloud"
steps:
- name: "Clone kie-tools"
uses: actions/checkout@v3
with:
path: kie-tools
repository: apache/incubator-kie-tools
# This bash script will set an output version for this step. It can be used with steps.version.outputs.version
- name: "Output version"
id: version
run: |
cd kie-tools
echo "version=$(node -e "console.log(require('./package.json').version);")" >> $GITHUB_OUTPUT
shell: bash
- name: "Cache Maven packages"
if: github.event_name != 'pull_request'
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: ~/.m2
key: ${{ runner.os }}-daily-dev-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-daily-dev-m2
- name: "Setup environment"
uses: ./kie-tools/.github/actions/setup-env
with:
working_dir: kie-tools
- name: "Bootstrap"
id: bootstrap
uses: ./kie-tools/.github/actions/bootstrap
with:
working_dir: kie-tools
- name: "Parse `commit_sha`"
id: commit_sha
shell: bash
run: |
cd kie-tools
echo "commit_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: "Build serverless-logic-web-tools"
env:
WEBPACK__minimize: "true"
WEBPACK__tsLoaderTranspileOnly: "false"
SERVERLESS_LOGIC_WEB_TOOLS__buildInfo: "${{ steps.version.outputs.version }} (daily-dev) @ ${{ steps.commit_sha.outputs.commit_sha }}"
run: |
cd kie-tools
pnpm -F @kie-tools/serverless-logic-web-tools... build:prod
- name: "Checkout serverless-logic-sandbox-deployment"
uses: actions/checkout@v3
with:
token: ${{ github.event_name != 'pull_request' && secrets.KIE_GROUP_TOOLS_TOKEN || secrets.GITHUB_TOKEN }}
path: serverless-logic-sandbox-deployment
repository: kiegroup/serverless-logic-sandbox-deployment
ref: gh-pages
- name: "Update serverless-logic-sandbox-deployment resources"
if: github.event_name != 'pull_request'
run: |
cd serverless-logic-sandbox-deployment
rm -rf dev
mkdir dev
cp -r ../kie-tools/packages/serverless-logic-web-tools/dist/* dev/
git config --global user.email "[email protected]"
git config --global user.name "KIE Group Tools (kie-group-tools)"
today=$(date -I)
git add . && git commit -m "KIE Tools Daily Dev Build resources - $today" || echo "No changes."
git push origin gh-pages
cd -