File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 13
13
steps :
14
14
- uses : actions/checkout@v2
15
15
16
+ - uses : actions/cache@v4
17
+ id : restore-build
18
+ with :
19
+ path : |
20
+ ovara-backend/target
21
+ key : ${{ github.sha }}
22
+
16
23
- name : Cache local Maven repository
17
24
uses : actions/cache@v4
18
25
with :
39
46
run : |
40
47
cd ovara-backend
41
48
mvn clean package -B -DskipTests
49
+
50
+ deploy-container :
51
+ needs : build
52
+ runs-on : ubuntu-latest
53
+
54
+ steps :
55
+ - uses : actions/checkout@v2
56
+
57
+ - uses : actions/cache@v4
58
+ id : restore-build
59
+ with :
60
+ path : |
61
+ ovara-backend/target
62
+ key : ${{ github.sha }}
63
+
64
+ - name : Build and deploy Docker container
65
+ shell : bash
66
+ env :
67
+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
68
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
69
+ run : |
70
+ set -euo pipefail
71
+ git clone https://github.com/Opetushallitus/ci-tools.git
72
+ source ci-tools/common/setup-tools.sh
73
+ export ARTIFACT_NAME="ovara-backend"
74
+ export BASE_IMAGE="baseimage-fatjar-openjdk21:master"
75
+ source ci-tools/common/setup-tools.sh
76
+ printf "HELLO\n"
77
+ ls ovara-backend
78
+ env
79
+ mv ovara-backend/target/ovara-backend-*.jar $DOCKER_BUILD_DIR/artifact/${ARTIFACT_NAME}.jar
80
+ cp -vr ovara-backend/src/main/resources/application.properties $DOCKER_BUILD_DIR/config/
81
+ ./ci-tools/common/pull-image.sh
82
+ ./ci-tools/github-build/build-fatjar.sh $ARTIFACT_NAME
83
+ ./ci-tools/github-build/upload-image.sh $ARTIFACT_NAME
You can’t perform that action at this time.
0 commit comments