Skip to content

Upgrade to Java 23 #168

Upgrade to Java 23

Upgrade to Java 23 #168

Workflow file for this run

name: Build and Release
on:
push:
branches: [ main ]
env:
REPO: ${{ github.event.repository.name }}
IMAGE_BASE: ${{ secrets.DOCKER_REGISTRY }}/${{ github.event.repository.name }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.new_tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup GraalVM
uses: graalvm/setup-graalvm@v1
with:
java-version: '23'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Run tests
run: ./gradlew test
- name: Submit tests to CodeCov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Generate new tag
id: tag
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: ''
- name: Setup Docker metadata
run: |
echo "IMAGE_NAME=${IMAGE_BASE}:${{ steps.tag.outputs.new_tag }}" >> $GITHUB_ENV
echo "DOCKER_USER=${{ secrets.DOCKER_USER }}" >> $GITHUB_ENV
echo "DOCKER_PASS=${{ secrets.DOCKER_PASS }}" >> $GITHUB_ENV
- name: Build native image
run: ./gradlew bootBuildImage
release:
needs: build
runs-on: on-prem
environment: 'Prod'
steps:
- name: Perform rolling update
run: |
kubectl -n default set image deploy/${REPO} ${REPO}=${IMAGE_BASE}:${{ needs.build.outputs.tag }}
kubectl -n default rollout status deploy/${REPO}