File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414dir=" $( dirname " $0 " ) "
1515
1616gitactionDir=.github
17- gitactionConfig=.gitaction.yml
17+ gitactionConfig=$gitactionDir /workflows/ .gitaction.yml
1818gitactionBuildScript=$gitactionDir /build.sh
1919gitactionSettingsFile=$gitactionDir /settings.xml
2020gitactionNotifyScript=$gitactionDir /notify.sh
@@ -123,17 +123,42 @@ process() {
123123
124124 # Add/update the GitHun Actions configuration file.
125125 cat > " $tmpFile " << EOL
126- language: java
127- jdk: openjdk8
128- branches:
129- only:
130- - $defaultBranch
131- - "/.*-[0-9]+\\\\ ..*/"
132- install: true
133- script: "$gitactionBuildScript "
134- cache:
135- directories:
136- - "~/.m2/repository"
126+ name: SciJava CI
127+
128+ on:
129+ push:
130+ branches:
131+ - $defaultBranch
132+ pull_request:
133+ branches:
134+ - $defaultBranch
135+
136+ jobs:
137+ build:
138+ runs-on: ubuntu-latest
139+
140+ steps:
141+ - uses: actions/checkout@v2
142+
143+ - name: Cache m2 modules
144+ uses: actions/cache@v2
145+ env:
146+ cache-name: cache-node-modules
147+ with:
148+ path: ~/.m2
149+ key: \$ {{ runner.os }}-build-\$ {{ env.cache-name }}
150+ restore-keys: |
151+ \$ {{ runner.os }}-build-\$ {{ env.cache-name }}-
152+ \$ {{ runner.os }}-build-
153+ \$ {{ runner.os }}-
154+
155+ - name: Set up JDK 8
156+ uses: actions/setup-java@v2
157+ with:
158+ java-version: '8'
159+ distribution: 'zulu'
160+ - name: Build with Maven
161+ run: ./$gitactionBuildScript
137162EOL
138163 update " $gitactionConfig "
139164
You can’t perform that action at this time.
0 commit comments