Skip to content

Commit

Permalink
[gha] Make sure we cache maven (and sort) and make sure docs are prop…
Browse files Browse the repository at this point in the history
…er EOF marked

Git expects all readable files have proper end of file line marker to assist with diffs.

Some info on this is here https://stackoverflow.com/questions/5813311/whats-the-significance-of-the-no-newline-at-end-of-file-log.

The largest contributor to this problem on the repo right now is the docs folder.
  • Loading branch information
hazendaz committed Jan 20, 2025
1 parent 33f2c49 commit dc89bb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ jobs:
- name: Set up JDK 11 Integration Run (Consumer Run)
uses: actions/setup-java@v4
with:
java-version: 11
cache: 'maven'
distribution: ${{ runner.os == 'macOS' && 'zulu' || 'temurin' }}
java-version: 11
- name: Load Maven 3.6.3 Integration Run (Consumer Run) using GitHub Provided Maven
run: mvn org.apache.maven.plugins:maven-wrapper-plugin:3.3.1:wrapper -V -B -D"maven=3.6.3"
- name: Test with Maven 3.6.3 Java 11 (Consumer Run)
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/snapshot-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
cache: 'maven'
distribution: 'zulu'
java-version: '21'
cache: 'maven'
- name: Build with Maven
run: ./mvnw clean install site -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Fix eol markers
run: cd docs && git grep --null --files-with-matches -I '' | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
Expand Down

0 comments on commit dc89bb4

Please sign in to comment.