Pull Request CI-Backend / Checks (pull_request) Successful in 6m48s
Pull Request CI-Frontend / Checks (pull_request) Successful in 6m59s
Pull Request CI-Backend / Build & Push (pull_request) Failing after 7m10s
Pull Request CI-Frontend / Build & Push (pull_request) Failing after 15m2s
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
name: Build Server Candidate
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push-server:
|
|
name: Build & Push Server
|
|
runs-on: graalvm-25
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ github.ref }}
|
|
|
|
- name: Cache Maven dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/server/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
|
|
- name: Set lowercase repo name
|
|
id: repo
|
|
run: echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Log in to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: lightroasted.vps-kinghost.net
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build Docker image
|
|
working-directory: ./server
|
|
run: |
|
|
./mvnw -Pnative -DskipTests spring-boot:build-image \
|
|
-Dspring-boot.build-image.imageName=lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:latest \
|
|
-Dspring-boot.build-image.builder=paketobuildpacks/builder-jammy-tiny:latest
|
|
|
|
- name: Tag and push candidate
|
|
run: |
|
|
docker tag lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:latest lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:candidate
|
|
docker push lightroasted.vps-kinghost.net/${{ steps.repo.outputs.name }}/api:candidate
|