Skip to content

Commit 4d4eec1

Browse files
committed
Update github action to separate push and verify
1 parent bc34cf7 commit 4d4eec1

File tree

2 files changed

+51
-17
lines changed

2 files changed

+51
-17
lines changed
Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2013-2022 Red Hat, Inc. (https://github.com/Commonjava/weft)
2+
# Copyright (C) 2011-2023 Red Hat, Inc. (https://github.com/Commonjava/indy)
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -14,19 +14,12 @@
1414
# limitations under the License.
1515
#
1616

17-
name: build on maven
17+
# This workflow will build a Java project with Maven
18+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
1819

19-
on:
20-
watch:
21-
types: [started]
22-
pull_request:
23-
types: [opened, reopened, edited, synchronize, ready_for_review]
24-
push:
25-
branches:
26-
- main
27-
- master
20+
name: maven push
2821

29-
workflow_dispatch:
22+
on: [push]
3023

3124
jobs:
3225
build:
@@ -48,10 +41,6 @@ jobs:
4841
with:
4942
sonatypeSnapshots: true
5043

51-
- name: Build the Maven verify phase
52-
run: mvn -B -V clean verify -Prun-its -Pci
53-
54-
5544
- uses: s4u/maven-settings-action@v2.8.0
5645
if: ${{ github.event_name == 'push' }}
5746
with:
@@ -64,4 +53,4 @@ jobs:
6453
6554
- name: Deploy the artifact
6655
if: ${{ github.event_name == 'push' }}
67-
run: mvn help:effective-settings -B -V clean deploy -e
56+
run: mvn help:effective-settings -B -V clean deploy -e

.github/workflows/maven-verify.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Copyright (C) 2011-2023 Red Hat, Inc. (https://github.com/Commonjava/indy)
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# This workflow will build a Java project with Maven
18+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
19+
20+
name: maven verify
21+
22+
on: [pull_request]
23+
24+
jobs:
25+
build:
26+
name: Build with maven
27+
runs-on: ubuntu-latest
28+
env:
29+
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Set up JDK 11 for x64
34+
uses: actions/setup-java@v3
35+
with:
36+
java-version: '11'
37+
distribution: 'temurin'
38+
architecture: x64
39+
40+
- uses: s4u/maven-settings-action@v2.8.0
41+
with:
42+
sonatypeSnapshots: true
43+
44+
- name: Build the Maven verify phase
45+
run: mvn -B -V clean verify -Prun-its -Pci

0 commit comments

Comments
 (0)