Skip to content

Commit

Permalink
Merge pull request #95 from VirtusLab/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
lwronski authored Sep 28, 2022
2 parents 4ee3458 + 976c1a0 commit 5730079
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 26 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ updates:
# Check the npm registry for updates every day (weekdays)
schedule:
interval: 'daily'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
os: [ubuntu-latest, macOS-latest, windows-latest]
jvm: ['11', 'temurin:17']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: |
npm install
- run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
update-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: npm install
- run: npm run all
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update dist
author: GitHub <[email protected]>
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ inputs:
description: 'Applications to install'
required: false
default: 'sbtn'
version:
description: 'Coursier version to install'
required: false
default: ''
outputs:
cs-version:
description: 'Version of the installed Coursier'
Expand Down
9 changes: 6 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
"@actions/tool-cache": "^2.0.1"
},
"devDependencies": {
"@types/node": "^18.7.5",
"@types/node": "^18.7.15",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"@vercel/ncc": "^0.34.0",
"eslint": "^7.32.0",
"eslint-plugin-github": "^4.3.2",
"js-yaml": "^4.1.0",
"prettier": "2.7.1",
"typescript": "^4.7.4"
"typescript": "^4.8.3"
}
}
9 changes: 6 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import * as os from 'os'
import * as path from 'path'
import * as tc from '@actions/tool-cache'

const csVersion = '2.1.0-M5'
let csVersion = core.getInput('version')
if (!csVersion) csVersion = '2.1.0-M6-49-gff26f8e39'
const scalaCLIVersion = '0.1.14'

const coursierVersionSpec = csVersion

async function execOutput(cmd: string, ...args: string[]): Promise<string> {
Expand Down Expand Up @@ -97,7 +99,8 @@ async function run(): Promise<void> {
})

await core.group('Install Apps', async () => {
const apps: string[] = core.getInput('apps').split(' ')
const value = core.getInput('apps').trim()
const apps: string[] = value.split(' ')
const scalaCLIVersionInput = core.getInput('scala-cli-version')
let version
if (scalaCLIVersionInput) {
Expand All @@ -110,7 +113,7 @@ async function run(): Promise<void> {
version = scalaCLIVersion
}
apps.push(`scala-cli${version ? `:${version}` : ''}`)
if (apps.length) {
if (value && apps.length) {
const coursierBinDir = path.join(os.homedir(), 'cs', 'bin')
core.exportVariable('COURSIER_BIN_DIR', coursierBinDir)
core.addPath(coursierBinDir)
Expand Down

0 comments on commit 5730079

Please sign in to comment.