-
Notifications
You must be signed in to change notification settings - Fork 17
68 lines (58 loc) · 1.84 KB
/
mvn-build-develop.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
name: Build code with Maven for pull requests to develop
on:
pull_request_target:
repository: dqops/dqo
branches:
- develop
push:
repository: dqops/dqo
branches:
- develop
jobs:
build-docker-develop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Restore cached npm packages
id: restore-cached-npm-packages
uses: actions/cache/restore@v3
with:
path: |
dqops/src/main/frontend/node
dqops/src/main/frontend/node_modules
key: 'npm'
- name: Build with Maven
run: mvn package -DskipTests -Pbuild-with-jdk-11 -Pdevelopment-build -Prun-npm
- name: Save cached npm packages
id: save-cached-npm-packages
uses: actions/cache/save@v3
with:
path: |
dqops/src/main/frontend/node
dqops/src/main/frontend/node_modules
key: 'npm'
- uses: docker-practice/actions-setup-docker@master
- uses: mr-smithers-excellent/docker-build-push@v6
name: Build and Push Docker Image
with:
image: dqops/dqo
tags: ${SHORT_SHA},develop
dockerfile: Dockerfile-fast
enableBuildKit: true
multiPlatform: true
platform: linux/amd64,linux/arm64
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}