-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
65 lines (59 loc) · 1.83 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: "SCC - Sloc, Cloc and Code Action"
author: "kevincobain2000"
description: "SCC - Sloc, Cloc and Code: Action to update README.md with code stats"
branding:
icon: 'heart'
color: 'green'
inputs:
limit:
description: "limit languages for scc"
required: false
default: "7"
filename:
description: "markdown file to update"
required: false
default: "README.md"
instachart_url:
description: "instachart url if self hosting"
required: false
default: "https://instachart.coveritup.app"
style:
description: "style of the chart"
required: false
default: "bar"
width:
description: "width of the chart"
required: false
default: "960"
height:
description: "width of the chart"
required: false
default: "700"
theme:
description: "theme of the chart"
required: false
default: "light"
runs:
using: "composite"
steps:
- uses: kevincobain2000/action-gobrew@v2
with:
version: latest
- name: Install scc
run: go install github.com/boyter/scc/v3@latest
shell: bash
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- run: scc.sh ${{ inputs.limit }} ${{ inputs.filename }} ${{ inputs.instachart_url }} ${{ github.repository_owner }} ${{ github.event.repository.name }} ${{ inputs.style }} ${{ inputs.width }} ${{ inputs.height }} ${{ inputs.theme }}
shell: bash
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "(action-scc) Update README.md" || echo "Nothing to update"
shell: bash
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.ref }}