-
Notifications
You must be signed in to change notification settings - Fork 408
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github actions to check POM file are well formatted.
fix
- Loading branch information
1 parent
03770f8
commit 3cca2cd
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "Check POM Formatting" | ||
description: "Check pom.xml file are well formatted with Maven" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
||
- name: Check POM formatting | ||
id: sort_pom | ||
shell: bash | ||
run: mvn -B com.github.ekryd.sortpom:sortpom-maven-plugin:verify -PallPom | ||
|
||
- name: Add comment | ||
if: failure() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: POM Formatting check Failed | ||
message: | | ||
:x: **Pom.xml files are not well formatted !** [(more details)](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
Ensure your code build locally using: | ||
``` | ||
mvn clean install | ||
``` | ||
Or just validate pom formatting with : | ||
``` | ||
mvn com.github.ekryd.sortpom:sortpom-maven-plugin:verify -PallPom | ||
``` | ||
You can format pom.xml file with : | ||
``` | ||
mvn com.github.ekryd.sortpom:sortpom-maven-plugin:sort -PallPom | ||
``` | ||
- name: Delete comment | ||
if: success() | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: POM Formatting check Failed | ||
delete: true |
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
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