-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaction.yml
51 lines (50 loc) · 1.29 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: 'Run octocov'
description: 'GitHub Action for octocov, a tool for collecting code coverage.'
branding:
icon: 'octagon'
color: 'gray-dark'
inputs:
github-token:
description: The GitHub token
default: ${{ github.token }}
required: false
version:
description: Version of octocov
default: latest
required: false
force:
description: Enable force setup
default: ''
required: false
config:
description: Config path
required: false
workdir:
description: Working directory
default: ''
required: false
runs:
using: 'composite'
steps:
-
uses: k1LoW/gh-setup@v1
with:
repo: github.com/k1LoW/octocov
github-token: ${{ inputs.github-token }}
version: ${{ inputs.version }}
bin-match: octocov
strict: true
force: ${{ inputs.force }}
-
name: Run octocov
uses: actions/github-script@v7
with:
script: |
const inputs = ${{ toJSON(inputs) }};
const toolpath = await io.which('octocov', true)
const opt = `--config=${inputs.config}`
const options = {};
options.cwd = inputs.workdir;
await exec.exec(`${toolpath} ${opt}`, [], options)
env:
OCTOCOV_GITHUB_TOKEN: ${{ inputs.github-token }}