Skip to content

Add execution stats to GraphQL responses (#23) #129

Add execution stats to GraphQL responses (#23)

Add execution stats to GraphQL responses (#23) #129

name: "Build and push Docker images"
permissions:
checks: write
packages: write
pull-requests: write
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Test with maven
run: ./mvnw -B test --file pom.xml
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
target/surefire-reports/*.xml
build-push-image:
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/jotajoti/jampuz-server
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Package jar
run: ./mvnw --file pom.xml -Pnative -DskipTests=true package
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: .
push: ${{ github.event_name != 'pull_request' }}
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
runs-on: ubuntu-latest
environment: Oracle Cloud
needs: build-push-image
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Trigger deploy to Coolify on Oracle Cloud
run: |
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}'