You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,12 +8,18 @@ GitHub Action for Maven based projects.
8
8
9
9
It checks out the repository, sets up Java, runs Maven and optional analysis.
10
10
11
-
### Example
11
+
### Recommendation
12
+
13
+
Instead of using a tag or branch, pinning to a full-length commit is recommended.
14
+
[Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot) helps to keep GH Actions up to date.
15
+
16
+
### Examples
12
17
13
18
Minimal example:
14
19
15
20
```yml
16
-
- uses: offa/maven-action@main
21
+
# Replace '<commit>' with the latest commit on main
22
+
- uses: offa/maven-action@<commit>
17
23
with:
18
24
java-version: '21'
19
25
```
@@ -32,7 +38,7 @@ jobs:
32
38
name: jdk-${{ matrix.java }}
33
39
steps:
34
40
- name: Build
35
-
uses: offa/maven-action@main
41
+
uses: offa/maven-action@<commit>
36
42
with:
37
43
java-version: ${{ matrix.java }}
38
44
pmd: true
@@ -43,7 +49,8 @@ jobs:
43
49
`java-version` is required, all other settings are optional with defaults
44
50
45
51
```yml
46
-
- uses: offa/maven-action@main
52
+
# Replace '<commit>' the the current main commit
53
+
- uses: offa/maven-action@<commit>
47
54
with:
48
55
# Java version to use (required) - whole or semver Java version
0 commit comments