-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
45 lines (37 loc) · 1.14 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
name: "Swift Doc Coverage"
description: "Documentation coverage command-line utility for Swift files."
author: "Iurii Khvorost"
inputs:
inputs:
description: "A path to a directory containing Swift (`.swift`) files in your workspace"
required: true
token:
required: true
description: 'Personal access token (PAT) used to fetch the repository.'
runs:
using: "composite"
steps:
- shell: bash
run: |
mkdir _sdc
cp -r ${{ github.action_path }}/* _sdc
- uses: actions/cache@v3
with:
path: |
_sdc/.build
_sdc/node_modules
key: ${{ runner.os }}-action-${{ hashFiles('**/_sdc/Package.resolved', '**/_sdc/package-lock.json') }}#
- shell: bash
run: |
cd _sdc
make install
npm install
cd -
# Run
- shell: bash
run: |
swift-doc-coverage ${{ inputs.inputs }} -r json -o "${{ github.workspace }}/result.json"
TOKEN="${{ inputs.token }}" FILE="${{ github.workspace }}/result.json" REPOSITORY="${{ github.repository }}" node ${{ github.action_path }}/action.js
branding:
icon: "book"
color: "orange"