Skip to content

Commit 2eea262

Browse files
committed
Update github action to separate push and verify
1 parent bc34cf7 commit 2eea262

File tree

2 files changed

+47
-19
lines changed

2 files changed

+47
-19
lines changed
Lines changed: 5 additions & 19 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/weft)
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,23 +14,13 @@
1414
# limitations under the License.
1515
#
1616

17-
name: build on maven
17+
name: maven push
1818

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
28-
29-
workflow_dispatch:
19+
on: [push]
3020

3121
jobs:
3222
build:
33-
name: Build with maven
23+
name: Maven deploy
3424
runs-on: ubuntu-latest
3525
env:
3626
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
@@ -48,10 +38,6 @@ jobs:
4838
with:
4939
sonatypeSnapshots: true
5040

51-
- name: Build the Maven verify phase
52-
run: mvn -B -V clean verify -Prun-its -Pci
53-
54-
5541
- uses: s4u/maven-settings-action@v2.8.0
5642
if: ${{ github.event_name == 'push' }}
5743
with:
@@ -64,4 +50,4 @@ jobs:
6450
6551
- name: Deploy the artifact
6652
if: ${{ github.event_name == 'push' }}
67-
run: mvn help:effective-settings -B -V clean deploy -e
53+
run: mvn help:effective-settings -B -V clean deploy -e

.github/workflows/maven-verify.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#
2+
# Copyright (C) 2011-2023 Red Hat, Inc. (https://github.com/Commonjava/weft)
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+
name: maven verify
18+
19+
on: [pull_request]
20+
21+
jobs:
22+
build:
23+
name: Maven verify
24+
runs-on: ubuntu-latest
25+
env:
26+
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Set up JDK 11 for x64
31+
uses: actions/setup-java@v3
32+
with:
33+
java-version: '11'
34+
distribution: 'temurin'
35+
architecture: x64
36+
37+
- uses: s4u/maven-settings-action@v2.8.0
38+
with:
39+
sonatypeSnapshots: true
40+
41+
- name: Build the Maven verify phase
42+
run: mvn -B -V clean verify -Prun-its -Pci

0 commit comments

Comments
 (0)