Skip to content

Commit

Permalink
Merge pull request #5 from k1LoW/use-action-script
Browse files Browse the repository at this point in the history
Use actions/github-script for using ACTIONS_RUNTIME_URL
  • Loading branch information
k1LoW authored Jan 25, 2024
2 parents 73db634 + fae2fab commit 02d21e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ runs:
force: ${{ inputs.force }}
-
name: Run octocov
run: octocov --config=${{ inputs.config }}
shell: bash
uses: actions/github-script@v7
with:
script: |
const inputs = ${{ toJSON(inputs) }};
toolpath = await io.which('octocov', true)
opt = `--config=${inputs.config}`
await exec.exec(`${toolpath} ${opt}`)
env:
OCTOCOV_GITHUB_TOKEN: ${{ inputs.github-token }}

3 changes: 3 additions & 0 deletions testdata/path/to/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ codeToTestRatio:
- '!**/*_test.go'
test:
- '**/*_test.go'
report:
datastores:
- artifact://${GITHUB_REPOSITORY}

0 comments on commit 02d21e7

Please sign in to comment.