Skip to content

Refs #1 - start refactor #1

Refs #1 - start refactor

Refs #1 - start refactor #1

Workflow file for this run

name: Build
on:
push:
paths:
- index/**
jobs:
push:
if: false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build
run: ./gradlew :index:clean :index:build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./index
platforms: linux/amd64,linux/arm64
push: true
tags: "${{ secrets.DOCKERHUB_USERNAME }}/jzindex:${{ github.sha }},${{ secrets.DOCKERHUB_USERNAME }}/jzindex:latest"
- name: Create staging
if: github.ref == 'refs/heads/main'
run: docker buildx imagetools create -t ${{ secrets.DOCKERHUB_USERNAME }}/jzindex:staging ${{ secrets.DOCKERHUB_USERNAME }}/jzindex:latest
- name: Generate summary
run: |
echo "Tag: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
- name: Upload reports if failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: index-reports
path: |
**/build/reports/
**/build/test-results/
- name: Upload coverage if passed
if: success()
uses: actions/upload-artifact@v4
with:
name: index-coverage
path: |
**/build/reports/jacoco/