Skip to content

Commit 71b6386

Browse files
committed
github-actionify: fix caching of Maven repo cache
The key was wrong. And setup-java supports easier caching anyway.
1 parent 75fefc3 commit 71b6386

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

github-actionify.sh

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,22 +113,12 @@ process() {
113113
# -- GitHub Action steps --
114114

115115
actionCheckout="uses: actions/checkout@v2"
116-
actionCacheLocalRepo="name: Cache local Maven repository
117-
uses: actions/cache@v2
118-
env:
119-
cache-name: cache-m2
120-
with:
121-
path: ~/.m2/repository
122-
key: \${{ runner.os }}-build-\${{ env.cache-name }}
123-
restore-keys: |
124-
\${{ runner.os }}-build-\${{ env.cache-name }}-
125-
\${{ runner.os }}-build-
126-
\${{ runner.os }}-"
127116
actionSetupJava="name: Set up Java
128117
uses: actions/setup-java@v2
129118
with:
130119
java-version: '8'
131-
distribution: 'zulu'"
120+
distribution: 'zulu'
121+
cache: 'maven'"
132122
actionSetupConda="name: Set up conda
133123
uses: s-weigand/setup-conda@v1
134124
- name: Install conda packages
@@ -164,7 +154,6 @@ jobs:
164154
165155
steps:
166156
- $actionCheckout
167-
- $actionCacheLocalRepo
168157
- $actionSetupJava
169158
EOL
170159
test -f environment.yml && echo " - $actionSetupConda" >>"$tmpFile"
@@ -190,7 +179,6 @@ jobs:
190179
191180
steps:
192181
- $actionCheckout
193-
- $actionCacheLocalRepo
194182
- $actionSetupJava
195183
EOL
196184
test -f environment.yml && echo " - $actionSetupConda" >>"$tmpFile"

0 commit comments

Comments
 (0)