-
-
Notifications
You must be signed in to change notification settings - Fork 176
99 lines (88 loc) · 2.87 KB
/
gradle.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
name: CI For Concept Microservice
on:
push:
branches: [ version-upgrade ]
pull_request:
branches: [ version-upgrade ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix: { dir: [
'core-banking-service',
'internet-banking-fund-transfer-service',
'internet-banking-user-service',
'internet-banking-utility-payment-service',
'internet-banking-service-registry',
'internet-banking-api-gateway'
] }
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Build
run: ./gradlew build -x test
working-directory: ${{ matrix.dir }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.dir }}-artifacts
path: |
${{ matrix.dir }}/build/libs/${{ matrix.dir }}*SNAPSHOT.jar
${{ matrix.dir }}/Dockerfile
${{ matrix.dir }}/wait-for-it.sh
retention-days: 1
overwrite: true
docker_publish:
runs-on: ubuntu-latest
strategy:
matrix: { dir: [
'core-banking-service',
'internet-banking-fund-transfer-service',
'internet-banking-user-service',
'internet-banking-utility-payment-service',
'internet-banking-service-registry',
'internet-banking-api-gateway'
] }
permissions:
contents: read
needs: build
steps:
- name: Download latest build artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.dir }}-artifacts
- name: Move artifacts to the correct directory
shell: bash
run: |
ls -lrt
mkdir -p ${{ matrix.dir }}-downloaded-artifacts
mv build ${{ matrix.dir }}-downloaded-artifacts
mv Dockerfile ${{ matrix.dir }}-downloaded-artifacts
mv wait-for-it.sh ${{ matrix.dir }}-downloaded-artifacts
ls -lrt
# - name: Test
# run: ls -lrt
# working-directory: ${{ matrix.dir }}
#
# - name: Build Docker image
# run: docker build -t ghcr.io/javatodev/${{ matrix.dir }} .
# working-directory: ${{ matrix.dir }}
# with:
# name: ${{ matrix.dir }}-artifacts
#
#
# - name: Build Docker image
# run: docker build -t ghcr.io/socialic-v2-0/socialic-connector-service:latest .
#
# - name: Log in to GitHub Container Registry
# run: echo ${{ secrets.DOCKER_ACTION_TOKEN }} | docker login ghcr.io -u chinthaka-dinadasa --password-stdin
#
# - name: Push Docker image to GitHub Container Registry
# run: docker push ghcr.io/socialic-v2-0/socialic-connector-service:latest