diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c96f058d..e6784bc5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,8 @@ jobs: - run: echo 'name := "foo"' > build.sbt - id: scala-cli-setup uses: ./ + env: + COURSIER_BIN_DIR: ${{ github.workspace }}/cs/bin with: jvm: ${{ matrix.jvm }} apps: sbt sbtn ammonite bloop:1.4.11 diff --git a/src/main.ts b/src/main.ts index c9c631a0..3f753a76 100644 --- a/src/main.ts +++ b/src/main.ts @@ -139,9 +139,15 @@ async function run(): Promise { } apps.push(`scala-cli${version ? `:${version}` : ''}`) if (value && apps.length) { - const coursierBinDir = path.join(os.homedir(), 'cs', 'bin') - core.exportVariable('COURSIER_BIN_DIR', coursierBinDir) - core.addPath(coursierBinDir) + if (process.env.COURSIER_BIN_DIR) { + core.addPath(process.env.COURSIER_BIN_DIR) + } else { + const coursierBinDir = path.join(os.homedir(), 'cs', 'bin') + core.exportVariable('COURSIER_BIN_DIR', coursierBinDir) + core.addPath(coursierBinDir) + } + // eslint-disable-next-line no-console + console.log('COURSIER_BIN_DIR', process.env.COURSIER_BIN_DIR) await cs('install', '--contrib', ...apps) core.setOutput( 'scala-cli-version',