Skip to content

Commit

Permalink
Change keys
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Jan 29, 2024
1 parent 11d4abe commit 67fdaff
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ inputs:
description: Config path
required: false
workdir:
description: Working directory (Deprecated)
default: ''
required: false
work-dir:
description: Working directory
default: ''
required: false
install-dir:
bin-dir:
description: "Install directory"
default: ''
required: false
Expand All @@ -47,11 +51,13 @@ runs:
script: |
const path = require('path');
const inputs = ${{ toJSON(inputs) }};
const toolpath = inputs['install-dir'] != '' ? path.join(inputs['install-dir'], 'octocov') : await io.which('octocov', true)
const toolpath = inputs['bin-dir'] != '' ? path.join(inputs['bin-dir'], 'octocov') : await io.which('octocov', true)
const opt = `--config=${inputs.config}`
const options = {};
options.cwd = inputs.workdir;
if (inputs.workdir != '') {
core.warning('Using workdir: to set working directory is deprecated. Use work-dir: instead.')
}
options.cwd = inputs['work-dir'] != '' ? inputs['work-dir'] : inputs.workdir;
await exec.exec(`${toolpath} ${opt}`, [], options)
env:
OCTOCOV_GITHUB_TOKEN: ${{ inputs.github-token }}

0 comments on commit 67fdaff

Please sign in to comment.