Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

chore: apply spotless #260

chore: apply spotless

chore: apply spotless #260

Workflow file for this run

# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Spring Boot CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths:
- 'backend/**'
- '.github/workflows/spring.yaml'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
java-version: '18'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
- name: Running Unit Tests
working-directory: backend
run: ./gradlew test
- name: Execute Gradle build
working-directory: backend
run: ./gradlew bootJAR
- name: Archive Game Build
uses: actions/upload-artifact@v3
with:
name: Backend
path: backend/build/libs/
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: ./backend/
file: ./backend/Dockerfile
push: true
tags: ghcr.io/se-tinf22b6/underwatch/backend:${{ github.sha }}, ghcr.io/se-tinf22b6/underwatch/backend:latest