11
11
required : false
12
12
default : " main"
13
13
type : string
14
- jobs :
14
+ jobs :
15
+ check_date :
16
+ runs-on : ubuntu-latest
17
+ name : Check latest commit
18
+ outputs :
19
+ should_run : ${{ steps.should_run.outputs.should_run }}
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ - name : print latest_commit
23
+ run : echo ${{ github.sha }}
24
+ - id : should_run
25
+ continue-on-error : true
26
+ name : check latest commit is less than a day
27
+ run : test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
15
28
galleon-plugins-build :
16
29
name : galleon-plugins-${{ matrix.os }}-jdk${{ matrix.java }}
17
30
runs-on : ${{ matrix.os }}
31
+ needs : check_date
32
+ if : ${{ needs.check_date.outputs.should_run != 'false' }}
18
33
outputs :
19
34
galleon-plugins-version : ${{ steps.version.outputs.galleon-plugins-version }}
20
35
galleon-version : ${{ steps.version.outputs.galleon-version }}
@@ -59,18 +74,21 @@ jobs:
59
74
wildfly-build-and-test :
60
75
name : Linux/Windows - JDK11 and JDK17
61
76
uses : wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@34.0.0.Final
77
+ needs : [check_date, galleon-plugins-build]
78
+ if : ${{ needs.check_date.outputs.should_run != 'false' }}
62
79
with :
63
80
build-arguments : ' -fae -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}} -Dversion.org.wildfly.plugin=5.1.0.Alpha2 -Dversion.org.wildfly.wildfly-channel-plugin=1.0.20 -Dversion.org.wildfly.bom-builder-plugin=2.0.8.Final'
64
81
java-versions : " ['11', '17']"
65
82
os : " ['ubuntu-latest', 'windows-latest']"
66
83
maven-repo-name : galleon-plugins-maven-repository
67
84
maven-repo-path : galleon-plugins-maven-repository.tar.gz
68
85
ref : ${{ inputs.wildfly-ref }}
69
- needs : galleon-plugins-build
70
86
71
87
wildfly-build-and-test-galleon-layers :
72
88
name : Galleon Linux - JDK11
73
89
uses : wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@34.0.0.Final
90
+ needs : [check_date, galleon-plugins-build]
91
+ if : ${{ needs.check_date.outputs.should_run != 'false' }}
74
92
with :
75
93
test-arguments : ' -fae -Dts.layers -Dts.galleon'
76
94
build-arguments : ' -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}} -Dversion.org.wildfly.plugin=5.1.0.Alpha2 -Dversion.org.wildfly.wildfly-channel-plugin=1.0.20 -Dversion.org.wildfly.bom-builder-plugin=2.0.8.Final'
@@ -79,11 +97,12 @@ jobs:
79
97
maven-repo-name : galleon-plugins-maven-repository
80
98
maven-repo-path : galleon-plugins-maven-repository.tar.gz
81
99
ref : ${{ inputs.wildfly-ref }}
82
- needs : galleon-plugins-build
83
100
84
101
wildfly-build-and-test-preview :
85
102
name : WildFly Preview - Linux- JDK17
86
103
uses : wildfly/wildfly/.github/workflows/shared-wildfly-build-and-test.yml@34.0.0.Final
104
+ needs : [check_date, galleon-plugins-build]
105
+ if : ${{ needs.check_date.outputs.should_run != 'false' }}
87
106
with :
88
107
test-arguments : ' -fae -Dts.preview'
89
108
build-arguments : ' -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}} -Dversion.org.wildfly.plugin=5.1.0.Alpha2 -Dversion.org.wildfly.wildfly-channel-plugin=1.0.20 -Dversion.org.wildfly.bom-builder-plugin=2.0.8.Final'
@@ -92,11 +111,12 @@ jobs:
92
111
maven-repo-name : galleon-plugins-maven-repository
93
112
maven-repo-path : galleon-plugins-maven-repository.tar.gz
94
113
ref : ${{ inputs.wildfly-ref }}
95
- needs : galleon-plugins-build
96
114
97
115
datasources-build-and-test :
98
116
name : WildFly Datasources galleon-pack build and test
99
117
runs-on : ${{ matrix.os }}
118
+ needs : [check_date, galleon-plugins-build]
119
+ if : ${{ needs.check_date.outputs.should_run != 'false' }}
100
120
strategy :
101
121
fail-fast : false
102
122
matrix :
@@ -129,4 +149,3 @@ jobs:
129
149
with :
130
150
name : surefire-reports-${{ matrix.os }}-${{ matrix.java }}
131
151
path : ' **/surefire-reports/*.txt'
132
- needs : galleon-plugins-build
0 commit comments