File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ # action.yml
2
+ name : ' Count Lines of Code (cloc)'
3
+ description : ' Count Lines of Code with https://github.com/AlDanial/cloc#stable-release'
4
+
5
+ # Controls when the action will run. Triggers the workflow on push or pull request
6
+ # events but only for the master branch
7
+ on :
8
+ push :
9
+ branches : [ master ]
10
+ pull_request :
11
+ branches : [ master ]
12
+
13
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
+ jobs :
15
+ # This workflow contains a single job called "build"
16
+ cloc :
17
+ # The type of runner that the job will run on
18
+ runs-on : ubuntu-latest
19
+
20
+ # Steps represent a sequence of tasks that will be executed as part of the job
21
+ steps :
22
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
23
+ - uses : actions/checkout@v2
24
+
25
+ # Runs a single command using the runners shell
26
+ - name : Install cloc
27
+ run : sudo apt-get install cloc
28
+
29
+ # Runs a set of commands using the runners shell
30
+ - name : Count Lines of Code
31
+ run : cloc $(git rev-parse HEAD) | tee -a cloc.txt
32
+
33
+ - name : Upload cloc output as a build artifact
34
+ uses : actions/upload-artifact@v1
35
+ with :
36
+ name : cloc
37
+ path : cloc.txt
38
+
39
+ branding :
40
+ icon : ' code'
41
+ color : ' blue'
You can’t perform that action at this time.
0 commit comments