Skip to content

Merge pull request #104 from gdisdevops/update-dependencies #223

Merge pull request #104 from gdisdevops/update-dependencies

Merge pull request #104 from gdisdevops/update-dependencies #223

Workflow file for this run

name: Java CI
on: [push]
jobs:
test:
name: "Test"
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes_version:
- "kindest/node:v1.26.0@sha256:691e24bd2417609db7e589e1a479b902d2e209892a10ce375fab60a8407c7352"
- "kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1"
- "kindest/node:v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315"
- "kindest/node:v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61"
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/kind-action@v1.5.0
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"