-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (45 loc) · 1.67 KB
/
build.yaml
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
name: CI Build
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
push:
branches:
- main
jobs:
build:
strategy:
matrix:
java-version: [ 17 ]
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- name: Cache Maven packages
uses: actions/[email protected]
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
env:
MAVEN_OPTS: -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3
run: mvn -B install --file pom.xml
- name: Push container images
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
echo $REGISTRY_PASSWORD | docker login ghcr.io -u $REGISTRY_USER --password-stdin
mvn -B package --file pom.xml -Pcontainer -DskipTests
docker push ghcr.io/oracle/coherence-micronaut-sockshop-carts:latest
docker push ghcr.io/oracle/coherence-micronaut-sockshop-catalog:latest
docker push ghcr.io/oracle/coherence-micronaut-sockshop-orders:latest
docker push ghcr.io/oracle/coherence-micronaut-sockshop-payment:latest
docker push ghcr.io/oracle/coherence-micronaut-sockshop-shipping:latest
docker push ghcr.io/oracle/coherence-micronaut-sockshop-users:latest
if: "github.event_name == 'push' && matrix.java-version == 11"