Skip to content

Commit cde045d

Browse files
author
games647
committed
Only build for main branches to fix duplicate actions with dependabot
1 parent ccdc455 commit cde045d

File tree

2 files changed

+38
-33
lines changed

2 files changed

+38
-33
lines changed

.github/workflows/maven.yml

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
# Human readable name in the actions tab
55
name: Java CI
66

7-
# Build on every push and pull request regardless of the branch
7+
# Build on every pull request regardless of the branch
88
# Wiki: https://help.github.com/en/actions/reference/events-that-trigger-workflows
99
on:
10-
- push
11-
- pull_request
10+
push:
11+
branches:
12+
- main
13+
pull_request:
14+
branches:
15+
- main
1216

1317
jobs:
1418
# job id
@@ -19,32 +23,32 @@ jobs:
1923

2024
# Run steps
2125
steps:
22-
# Pull changes
23-
- uses: actions/[email protected]
24-
25-
# Cache artifacts - however this has the downside that we don't get notified of
26-
# artifact resolution failures like invalid repository
27-
# Nevertheless the repositories should be more stable and it makes no sense to pull
28-
# a same version every time
29-
# A dry run would make more sense
30-
- uses: actions/[email protected]
31-
with:
32-
path: ~/.m2/repository
33-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
34-
restore-keys: |
35-
${{ runner.os }}-maven-
36-
37-
# Setup Java
38-
- name: Set up JDK
39-
uses: actions/[email protected]
40-
with:
41-
distribution: 'adopt'
42-
# Use Java 11, because it's minimum required version
43-
java-version: 11
44-
45-
# Build and test (included in package)
46-
- name: Build with Maven and test
47-
# Run non-interactive, package (with compile+test),
48-
# ignore snapshot updates, because they are likely to have breaking changes, enforce checksums to validate
49-
# possible errors in dependencies
50-
run: mvn test --batch-mode --no-snapshot-updates --strict-checksums --file pom.xml
26+
# Pull changes
27+
- uses: actions/[email protected]
28+
29+
# Cache artifacts - however this has the downside that we don't get notified of
30+
# artifact resolution failures like invalid repository
31+
# Nevertheless the repositories should be more stable and it makes no sense to pull
32+
# a same version every time
33+
# A dry run would make more sense
34+
- uses: actions/[email protected]
35+
with:
36+
path: ~/.m2/repository
37+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
38+
restore-keys: |
39+
${{ runner.os }}-maven-
40+
41+
# Setup Java
42+
- name: Set up JDK
43+
uses: actions/[email protected]
44+
with:
45+
distribution: 'adopt'
46+
# Use Java 11, because it's minimum required version
47+
java-version: 11
48+
49+
# Build and test (included in package)
50+
- name: Build with Maven and test
51+
# Run non-interactive, package (with compile+test),
52+
# ignore snapshot updates, because they are likely to have breaking changes, enforce checksums to validate
53+
# possible errors in dependencies
54+
run: mvn test --batch-mode --no-snapshot-updates --strict-checksums --file pom.xml

bukkit/src/main/java/com/github/games647/fastlogin/bukkit/listener/protocollib/NameCheckTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ public void run() {
7474
}
7575

7676
@Override
77-
public FastLoginPreLoginEvent callFastLoginPreLoginEvent(String username, ProtocolLibLoginSource source, StoredProfile profile) {
77+
public FastLoginPreLoginEvent callFastLoginPreLoginEvent(String username, ProtocolLibLoginSource source,
78+
StoredProfile profile) {
7879
BukkitFastLoginPreLoginEvent event = new BukkitFastLoginPreLoginEvent(username, source, profile);
7980
plugin.getServer().getPluginManager().callEvent(event);
8081
return event;

0 commit comments

Comments
 (0)