Skip to content

Commit c90ba04

Browse files
author
xlui
authored
Merge pull request #2 from xlui/feature/2.0
Remove unsupport features, update actions
2 parents 8b5c36e + bc042e1 commit c90ba04

File tree

15 files changed

+26
-381
lines changed

15 files changed

+26
-381
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
FROM maven:3.6-jdk-11-slim
1+
FROM maven:3.6-openjdk-11-slim
22

3-
LABEL "name"="Maven CLI Action with JDK 11"
3+
LABEL "name"="Maven CLI For GitHub Actions"
44
LABEL "maintainer"="xlui <i@xlui.me>"
5-
LABEL "version"="1.1.0"
5+
LABEL "version"="2.0"
66

7-
LABEL "com.github.actions.name"="GitHub Action for Maven & JDK 11"
8-
LABEL "com.github.actions.description"="Provide maven cli for JDK 11 projects."
7+
LABEL "com.github.actions.name"="Maven CLI For GitHub Actions"
8+
LABEL "com.github.actions.description"="Provide maven cli for GitHub Actions"
99
LABEL "com.github.actions.icon"="package"
1010
LABEL "com.github.actions.color"="green"
11-
COPY LICENSE README.md /
1211

12+
COPY LICENSE README.md /
1313
COPY entrypoint.sh /entrypoint.sh
1414

1515
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,50 @@
1-
# GitHub Action for the Maven CLI
1+
# Maven CLI For GitHub Actions
22

3-
The [origin project](https://github.com/LucaFeger/action-maven-cli) creates a Maven action with only JDK 8. But I'm writing java with JDK 11 and in the short future I'll keep using JDK 11. So I have forked the origin repository and add support for JDK 11.
4-
5-
The GitHub Action for [Maven](https://maven.apache.org/) wraps the Maven CLI to enable Maven commands to be run. This can be used to run every Maven Command.
3+
The Maven CLI For GitHub Actions wraps the maven cli to enable maven commands to be runned inner GitHub Actions. You can use all the maven commands to do whatever you want.
64

75
## Usage
86

97
```yml
10-
# This is a basic workflow to help you get started with Actions
11-
12-
name: CI
8+
name: Run maven test on push
139

14-
# Controls when the action will run. Triggers the workflow on push or pull request
15-
# events but only for the master branch
1610
on:
1711
push:
1812
branches: [ master ]
1913
pull_request:
2014
branches: [ master ]
2115

22-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2316
jobs:
24-
# This workflow contains a single job called "build"
2517
build:
26-
# The type of runner that the job will run on
2718
runs-on: ubuntu-latest
2819

29-
# Steps represent a sequence of tasks that will be executed as part of the job
3020
steps:
31-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
32-
- uses: actions/checkout@v2
33-
34-
# Runs a single command using the runners shell
35-
- name: Run a one-line script
36-
run: echo Hello, world!
21+
- name: 1. Checkout code
22+
uses: actions/checkout@v2
3723

38-
# Runs a set of commands using the runners shell
39-
- name: Run maven script
40-
uses: xlui/action-maven-cli/jdk11@master
41-
id: test
24+
- name: 2. Run maven test
25+
uses: xlui/action-maven-cli
4226
with:
4327
lifecycle: 'clean package test'
4428
```
4529
46-
Under the last `jobs.build.steps.name` you can set the value of `uses` to this action.
30+
You can specify any maven lifecycle at the last part of the file.
4731
48-
```yml
49-
uses: xlui/action-maven-cli/jdk11@master
50-
```
32+
In the above example we customize a lifecycle `clean package test`, the real command GitHub Actions run is:
5133

52-
or
34+
```bash
35+
#!/bin/sh -l
5336
54-
```yml
55-
uses: xlui/action-maven-cli/jdk8@master
56-
```
37+
set -e
5738
58-
As JDK 11 is the latest LTS JDK, there is a convenient way to use it:
39+
echo "==========Starting Maven Commands=========="
5940
60-
```yml
61-
uses: xlui/action-maven-cli@master
41+
sh -c "mvn clean package test"
42+
43+
echo "==========Finished Maven Commands=========="
6244
```
6345

46+
Have you noticed the conversion?
47+
6448
## License
6549

6650
The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE.md).

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Maven CLI for the GitHub Actions'
2-
description: 'Use Maven CLI with JDK 8, 11, 13'
1+
name: 'Maven CLI For GitHub Actions'
2+
description: 'Use Maven CLI with JDK 8, 11, 14'
33
inputs:
44
lifecycle:
55
description: 'Maven lifecycles'

jdk11/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

jdk11/LICENSE

Lines changed: 0 additions & 23 deletions
This file was deleted.

jdk11/README.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

jdk11/entrypoint.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

jdk13/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

jdk13/LICENSE

Lines changed: 0 additions & 23 deletions
This file was deleted.

jdk13/README.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)