File tree 1 file changed +15
-5
lines changed
1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -8,20 +8,30 @@ inputs:
8
8
runs :
9
9
using : " composite"
10
10
steps :
11
+ - name : Set up cache paths
12
+ id : cache-paths
13
+ shell : bash
14
+ run : |
15
+ if [[ "$RUNNER_OS" == "Windows" ]]; then
16
+ echo "setupsbt_path=D:/a/_setupsbt" >> $GITHUB_OUTPUT
17
+ else
18
+ echo "setupsbt_path=/home/runner/work/_setupsbt" >> $GITHUB_OUTPUT
19
+ fi
20
+
11
21
- name : Cache sbt distribution
12
22
id : cache-dir
13
23
uses : actions/cache@v4
14
24
with :
15
- path : setupsbt
25
+ path : ${{ steps.cache-paths.outputs.setupsbt_path }}
16
26
key : ${{ runner.os }}-sbt-${{ inputs.sbt-runner-version }}
17
27
18
28
- name : " Install sbt"
19
29
shell : bash
20
30
if : steps.cache-dir.outputs.cache-hit != 'true'
21
31
run : |
22
- mkdir -p setupsbt
23
- curl -sL https://github.com/sbt/sbt/releases/download/v$SBT_RUNNER_VERSION/sbt-$SBT_RUNNER_VERSION.zip > setupsbt /sbt-$SBT_RUNNER_VERSION.zip
24
- pushd setupsbt
32
+ mkdir -p "${{ steps.cache-paths.outputs.setupsbt_path }}"
33
+ curl -sL https://github.com/sbt/sbt/releases/download/v$SBT_RUNNER_VERSION/sbt-$SBT_RUNNER_VERSION.zip > "${{ steps.cache-paths.outputs.setupsbt_path }} /sbt-$SBT_RUNNER_VERSION.zip"
34
+ pushd "${{ steps.cache-paths.outputs.setupsbt_path }}"
25
35
unzip -o "sbt-$SBT_RUNNER_VERSION.zip"
26
36
popd
27
37
env :
30
40
- name : " Setup PATH"
31
41
shell : bash
32
42
run : |
33
- pushd setupsbt
43
+ pushd "${{ steps.cache-paths.outputs.setupsbt_path }}"
34
44
ls sbt/bin/sbt
35
45
echo "$PWD/sbt/bin" >> "$GITHUB_PATH"
36
46
popd
You can’t perform that action at this time.
0 commit comments