feat: upstream merge #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push a CRF-only docker image | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: gradle | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
checks: write | |
statuses: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Build with Gradle | |
run: ./gradlew clean assemble --info --stacktrace --no-daemon | |
- name: Test with Gradle Jacoco and Coveralls | |
run: ./gradlew test jacocoTestReport coveralls --no-daemon | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: ${{ !cancelled() }} | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
format: jacoco | |
file: build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml | |
docker-build-crf: | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Login to registry | |
uses: docker/login-action@v3 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
registry: docker.evidenceprime.com | |
username: ${{ secrets.DOCKER_PUBLIC_LOGIN }} | |
password: ${{ secrets.DOCKER_PUBLIC_PASSWORD }} | |
- name: Build and push image to registry | |
uses: docker/build-push-action@v6 | |
with: | |
context: '.' | |
file: Dockerfile.crf | |
tags: docker.evidenceprime.com/grobid-nonroot-dexter:${{ github.sha }} | |
push: ${{ github.event_name == 'push' }} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |