-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (56 loc) · 1.73 KB
/
ci.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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ "*" ]
jobs:
Build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java: [8]
steps:
- name: "Cache Maven Repos"
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: "Checkout"
uses: actions/checkout@v3
- name: "Set up JDK ${{ matrix.java }}"
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
architecture: x64
- name: "Print maven version"
run: mvn -version
- name: "Build with Maven"
run: mvn clean package -Dmaven.test.skip=true
Docker:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java: [8]
steps:
- name: "Login to Docker Registry"
uses: docker/login-action@v2
with:
registry: release.daocloud.io
username: ${{ secrets.DAOCLOUD_REGISTRY_USERNAME }}
password: ${{ secrets.DAOCLOUD_REGISTRY_PWD }}
- name: Get Hash
id: hash
run: echo "${{ github.sha }}"
- name: "Build and Push"
uses: docker/build-push-action@v4
with:
push: true
tags: release.daocloud.io/skoala/envoy-authz-java:${{ github.sha }}