Skip to content

Bump openjdk from 22 to 23 #172

Bump openjdk from 22 to 23

Bump openjdk from 22 to 23 #172

Workflow file for this run

name: Build Flow
on:
pull_request:
branches:
- '*'
push:
branches:
- 'master'
env:
MONGODB_URI: 'mongodb://localhost:27017'
APPLICATION_PORT: '8080'
USERNAME: ${{secrets.OSSRH_USERNAME}}
TOKEN: ${{secrets.OSSRH_TOKEN}}
KAFKA_URL: localhost:9092
APPWRITE_ENDPOINT: http://localhost/v1
APPWRITE_PROJECT_ID: PROJECT_ID
APPWRITE_AUTH_API_KEY: LONG_API_KEY
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: gradle clean build
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: java-app
path: ./build/libs/${{ github.event.repository.name }}-0.0.1-SNAPSHOT.jar
docker-build:
name: Docker Build
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
path: ./build/libs/
name: java-app
- name: Build Docker image
run: docker build -t test_image:latest .