-
Notifications
You must be signed in to change notification settings - Fork 4
48 lines (48 loc) · 1.79 KB
/
build.yml
File metadata and controls
48 lines (48 loc) · 1.79 KB
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
name: 'Build app stack'
on:
workflow_call:
inputs:
branch:
description: Branch name
required: true
default: 'main'
type: string
type:
description: Stack type
required: true
default: 'java'
type: string
artifact-prefix:
description: Artifact prefix
required: false
default: ''
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: create-artifact
run: |
ls -lai
find ./${{ inputs.type }} -maxdepth 1 -type f | xargs mv -t .
sed -i -e "/###HEADER###/r interface-header.yaml" -e "//d" interface.yaml
rm interface-header.yaml
sed -i -e "/###APPLICATION_GROUP###/r interface-application-group.yaml" -e "//d" interface.yaml
rm interface-application-group.yaml
sed -i -e "/###APP_CONFIG_GROUP###/r interface-app-config-group.yaml" -e "//d" interface.yaml
rm interface-app-config-group.yaml
sed -i -e "/###APPLICATION###/r interface-application.yaml" -e "//d" interface.yaml
rm interface-application.yaml
sed -i -e "/###APP_CONFIG###/r interface-app-config.yaml" -e "//d" interface.yaml
rm interface-app-config.yaml
zip -r ./appstackfor${{ inputs.type }}.zip . -x "*.git*" -x "java/*" -x "test/*" -x "images/*" -x "listing/*" -x ".github/*" -x "*.md" -x "troubleshooting/*" -x "tutorials/*" -x "screenshots/*" -x "*.md"
ls -lai
- name: upload-artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-prefix }}appstackfor${{ inputs.type }}
path: ./appstackfor${{ inputs.type }}.zip