From 28ddbe635a4cfbd69def03e311ab71d5698a4401 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 18 Nov 2020 16:28:51 +0000 Subject: [PATCH 1/7] Build using maven --- workflow-templates/maven.properties.json | 8 + workflow-templates/maven.svg | 1264 ++++++++++++++++++++++ workflow-templates/maven.yml | 30 + 3 files changed, 1302 insertions(+) create mode 100644 workflow-templates/maven.properties.json create mode 100644 workflow-templates/maven.svg create mode 100644 workflow-templates/maven.yml diff --git a/workflow-templates/maven.properties.json b/workflow-templates/maven.properties.json new file mode 100644 index 0000000..2211ee9 --- /dev/null +++ b/workflow-templates/maven.properties.json @@ -0,0 +1,8 @@ +{ + "name": "Build using Maven", + "description": "Build using Maven.", + "iconName": "maven", + "categories": [ + "Maven POM" + ] +} \ No newline at end of file diff --git a/workflow-templates/maven.svg b/workflow-templates/maven.svg new file mode 100644 index 0000000..55a27a5 --- /dev/null +++ b/workflow-templates/maven.svg @@ -0,0 +1,1264 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workflow-templates/maven.yml b/workflow-templates/maven.yml new file mode 100644 index 0000000..655d5a1 --- /dev/null +++ b/workflow-templates/maven.yml @@ -0,0 +1,30 @@ +# Builds using maven + +--- +name: Maven + +on: [push] + +jobs: + build: + strategy: + matrix: + java: [1.8, 11] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + env: + gradle_version: 5.2.1 # set to empty to build with most recent version of gradle + steps: + - uses: actions/checkout@v2 + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml) }} + restore-keys: ${{ runner.os }}-m2 + - name: Build + run: mvn install From 6a841cc660a34983212b1192c2a60dca2482c1e8 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 18 Nov 2020 16:30:52 +0000 Subject: [PATCH 2/7] remove variable --- workflow-templates/maven.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/workflow-templates/maven.yml b/workflow-templates/maven.yml index 655d5a1..d2c8f23 100644 --- a/workflow-templates/maven.yml +++ b/workflow-templates/maven.yml @@ -12,8 +12,6 @@ jobs: java: [1.8, 11] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} - env: - gradle_version: 5.2.1 # set to empty to build with most recent version of gradle steps: - uses: actions/checkout@v2 - name: Set up JDK ${{ matrix.java }} From e2d902af537f6e4ccd39908af2c6fba0b7ea28ac Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 18 Nov 2020 16:32:29 +0000 Subject: [PATCH 3/7] add build option --- workflow-templates/maven.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/workflow-templates/maven.yml b/workflow-templates/maven.yml index d2c8f23..f4d4416 100644 --- a/workflow-templates/maven.yml +++ b/workflow-templates/maven.yml @@ -3,7 +3,11 @@ --- name: Maven -on: [push] +on: + push: + pull_request: + schedule: + - cron: '0 0 * * 0' jobs: build: From c852278ab90eaca88e7e0ccb9710e384b0fb4a2c Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 18 Nov 2020 16:49:57 +0000 Subject: [PATCH 4/7] add line --- workflow-templates/maven.properties.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow-templates/maven.properties.json b/workflow-templates/maven.properties.json index 2211ee9..09b1a42 100644 --- a/workflow-templates/maven.properties.json +++ b/workflow-templates/maven.properties.json @@ -5,4 +5,4 @@ "categories": [ "Maven POM" ] -} \ No newline at end of file +} From 33ed864e4f944f8607abb0e4e8aa6748a1b0f446 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Wed, 18 Nov 2020 16:50:09 +0000 Subject: [PATCH 5/7] fix quote --- workflow-templates/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow-templates/maven.yml b/workflow-templates/maven.yml index f4d4416..3978dde 100644 --- a/workflow-templates/maven.yml +++ b/workflow-templates/maven.yml @@ -26,7 +26,7 @@ jobs: uses: actions/cache@v2 with: path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml) }} + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build run: mvn install From 01efcabe45ec7688e0843fd9bfcbe7c6d04c2ad5 Mon Sep 17 00:00:00 2001 From: jean-marie burel Date: Thu, 26 Nov 2020 09:05:32 +0000 Subject: [PATCH 6/7] Update workflow-templates/maven.properties.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien Besson --- workflow-templates/maven.properties.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/workflow-templates/maven.properties.json b/workflow-templates/maven.properties.json index 09b1a42..1bd6d98 100644 --- a/workflow-templates/maven.properties.json +++ b/workflow-templates/maven.properties.json @@ -4,5 +4,8 @@ "iconName": "maven", "categories": [ "Maven POM" + ], + "filePatterns": [ + "pom.xml$" ] } From 3ced1f415e930b8f89154105d636dfb2fea7e57b Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 1 Dec 2020 17:09:55 +0000 Subject: [PATCH 7/7] add option to specify the commands --- workflow-templates/maven.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workflow-templates/maven.yml b/workflow-templates/maven.yml index 3978dde..3c5048f 100644 --- a/workflow-templates/maven.yml +++ b/workflow-templates/maven.yml @@ -1,5 +1,5 @@ # Builds using maven - +# Pass the arguments you wish to run to maven_commands variable, default command will be mvn install --- name: Maven @@ -16,6 +16,8 @@ jobs: java: [1.8, 11] os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} + env: + maven_commands: install # default is install steps: - uses: actions/checkout@v2 - name: Set up JDK ${{ matrix.java }} @@ -29,4 +31,4 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Build - run: mvn install + run: mvn ${{ env.maven_commands }}