forked from DaspawnW/vault-crd
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (59 loc) · 2.14 KB
/
maven.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
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
name: Java CI
on: [push]
jobs:
test:
name: "Test"
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes_version:
- "kindest/node:v1.29.1@sha256:a0cc28af37cf39b019e2b448c54d1a3f789de32536cb5a5db61a49623e527144"
- "kindest/node:v1.28.6@sha256:b7e1cf6b2b729f604133c667a6be8aab6f4dde5bb042c1891ae248d9154f665b"
- "kindest/node:v1.27.10@sha256:3700c811144e24a6c6181065265f69b9bf0b437c45741017182d7c82b908918f"
- "kindest/node:v1.26.13@sha256:15ae92d507b7d4aec6e8920d358fc63d3b980493db191d7327541fbaaed1f789"
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
cache: 'maven'
- uses: helm/[email protected]
with:
version: "v0.17.0"
node_image: "${{ matrix.kubernetes_version }}"
- name: "Kubernetes version"
run: |
kubectl version
- name: "Create Custom Resource"
run: |
kubectl apply -f crd.yml
- name: Build with Maven
run: mvn -B package --file pom.xml -Dspring.profiles.active=test
docker-push:
name: Docker Push (GHCR & public ECR)
runs-on: ubuntu-latest
#if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/docker-')
permissions:
id-token: write
contents: read
packages: write
needs: test
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Docker publish
uses: daspawnw/docker-multi-build-push-action@master
with:
platforms: "linux/amd64,linux/arm64"
docker-tag: "${{ steps.vars.outputs.tag }}"
ghcr-enabled: "true"
ghcr-token: "${{ secrets.GITHUB_TOKEN }}"
ecr-enabled: "true"
ecr-role-to-assume: "${{ secrets.AWS_PUBLIC_ECR_ARN }}"
ecr-repository-url: "public.ecr.aws/l2l6k4u5/vault-crd"