spring boot 3.3.1 & java 22 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Helm | |
on: | |
push: | |
# Publish semver tags as releases. | |
tags: [ 'v*.*.*' ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
REGISTRY: ghcr.io | |
OCI_PATH: ${{ github.repository_owner }}/charts | |
jobs: | |
helm: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 22 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '22' | |
distribution: 'temurin' | |
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. | |
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | |
- name: Generate CRD with Gradle Wrapper | |
run: ./gradlew compileJava | |
- name: Install Helm | |
uses: azure/[email protected] | |
- name: Prepare Chart | |
run: | | |
mkdir -p ./charts/restic-volume-populator/crds | |
cp ./build/classes/java/main/META-INF/fabric8/resticvolumepopulators.ansarhun.github.com-v1.yml ./charts/restic-volume-populator/crds/ | |
- name: Validate Chart | |
run: | | |
helm lint ./charts/restic-volume-populator | |
- name: Generate Chart | |
if: github.event_name != 'pull_request' | |
run: | | |
helm package ./charts/restic-volume-populator --version ${{ github.ref_name }} --app-version ${{ github.ref_name }} | |
# Set up BuildKit Docker container builder to be able to build | |
# multi-platform images and export cache | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
if: github.event_name != 'pull_request' | |
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 | |
# Login against a Docker registry except on PR | |
# https://github.com/docker/login-action | |
- name: Log into registry ${{ env.REGISTRY }} | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Helm Chart | |
if: github.event_name != 'pull_request' | |
run: | | |
helm push ./restic-volume-populator-${{ github.ref_name }}.tgz oci://${{ env.REGISTRY }}/${{ env.OCI_PATH }} |