Skip to content

Allow build job to write contents #40

Allow build job to write contents

Allow build job to write contents #40

Workflow file for this run

name: Java CI with Maven
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
- run: mvn -B verify
- uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
- uses: cicirello/[email protected]
- if: github.ref == 'refs/heads/main'
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name "Matomo Java Tracker"
git config --global user.email "[email protected]"
git add -A
git commit -m "Autogenerated JaCoCo coverage badge"
git push
fi