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