-
Notifications
You must be signed in to change notification settings - Fork 65
66 lines (63 loc) · 2.26 KB
/
tomcat_build_upload.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
name: Build and Upload Embedded Tomcat
on:
push:
branches:
- master
- test-tomcat
paths:
- "bahmni-embedded-tomcat/**"
- "bahmni-embedded-tomcat-10/**"
- "gradle.properties"
- ".github/workflows/tomcat_build_upload.yml"
workflow_dispatch:
jobs:
trivy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Trivy Scan
run: ./.github/trivy_scan.sh bahmni-embedded-tomcat
build-upload-artifact:
name: Build and upload embedded Tomcat Server artifact
runs-on: ubuntu-latest
needs: trivy
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "8"
- name: Generate Artifact for bahmni-embedded-tomcat
run: ./gradlew :bahmni-embedded-tomcat:clean :bahmni-embedded-tomcat:build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_MVN_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.S3_MVN_SECRET_KEY }}
aws-region: ap-southeast-1
- name: Upload Artifact for bahmni-embedded-tomcat
run: aws s3 cp bahmni-embedded-tomcat/build/libs/bahmni-embedded-tomcat-*.jar s3://repo.mybahmni.org/packages/build/
build-upload-artifact-10:
name: Build and upload embedded Tomcat 10 Server artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "17"
- name: Generate Artifact for bahmni-embedded-tomcat-10
run: |
cd bahmni-embedded-tomcat-10
gradle clean build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_MVN_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.S3_MVN_SECRET_KEY }}
aws-region: ap-southeast-1
- name: Upload Artifact for bahmni-embedded-tomcat-10
run: aws s3 cp bahmni-embedded-tomcat-10/build/libs/bahmni-embedded-tomcat-10-*.jar s3://repo.mybahmni.org/packages/build/