File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules
2+ dist
3+ .git
4+ .github
5+ * .md
6+ .gitignore
7+ .npmrc
8+ coverage
9+ .env
10+ * .log
Original file line number Diff line number Diff line change 1515 with :
1616 fetch-depth : 0
1717
18- - name : Setup Node.js
19- uses : actions/setup-node@v4
20- with :
21- node-version : " 20"
22-
23- - name : Setup Go
24- uses : actions/setup-go@v5
25- with :
26- go-version : " 1.22"
27-
28- - name : Install SCC
29- run : go install github.com/boyter/scc/v3@latest
30-
3118 - name : Update code.json
32- uses : ./
19+ uses : DSACMS/automated-codejson-generator@main
3320 with :
3421 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35- BRANCH : " main"
22+ BRANCH : " main"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 77 description : " GitHub token used for API access"
88 required : true
99 default : ${{ github.token }}
10+
1011 BRANCH :
1112 description : " Name of the branch the PR is sent to"
1213 required : false
@@ -19,5 +20,9 @@ outputs:
1920 description : " URL of the created pull request if changes were made"
2021
2122runs :
22- using : node20
23- main : dist/index.js
23+ using : docker
24+ image : Dockerfile
25+
26+ branding :
27+ icon : ' file-text'
28+ color : ' blue'
Original file line number Diff line number Diff line change 2424 "forks" : 0 ,
2525 "clones" : 0
2626 },
27- "platforms" : [
28- " web" ,
29- " linux"
30- ],
31- "categories" : [
32- " developer-tools" ,
33- " automation"
34- ],
27+ "platforms" : [" web" , " linux" ],
28+ "categories" : [" developer-tools" , " automation" ],
3529 "softwareType" : " standalone/backend" ,
36- "languages" : [
37- " TypeScript" ,
38- " JavaScript"
39- ],
30+ "languages" : [" TypeScript" , " JavaScript" ],
4031 "maintenance" : " internal" ,
4132 "contractNumber" : " " ,
4233 "date" : {
4334 "created" : " 2025-02-07T16:29:38Z" ,
4435 "lastModified" : " 2025-06-06T17:48:49Z" ,
4536 "metaDataLastUpdated" : " 2025-06-06T17:49:37.841Z"
4637 },
47- "tags" : [
48- " github-action" ,
49- " codejson"
50- ],
38+ "tags" : [" github-action" , " codejson" ],
5139 "contact" : {
5240 "email" : " opensource@cms.hhs.gov" ,
5341 "name" : " CMS Open Source Team"
6351 "projects" : [],
6452 "systems" : [],
6553 "upstream" : " " ,
66- "subsetInHealthcare" : [
67- " Operational"
68- ],
69- "userType" : [
70- " Government"
71- ],
54+ "subsetInHealthcare" : [" Operational" ],
55+ "userType" : [" Government" ],
7256 "maturityModelTier" : 3
73- }
57+ }
Original file line number Diff line number Diff line change 1+ FROM node:20-alpine
2+
3+ RUN apk add --no-cache go git
4+
5+ RUN go install github.com/boyter/scc/v3@latest
6+
7+ WORKDIR /action
8+
9+ COPY package*.json ./
10+ RUN npm ci
11+
12+ COPY . .
13+
14+ RUN npm run bundle
15+
16+ ENV PATH="/root/go/bin:${PATH}"
17+
18+ ENTRYPOINT ["node", "/action/dist/index.js"]
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ async function getBasicInfo(): Promise<BasicRepoInfo> {
8181
8282async function getLaborHours ( ) : Promise < number > {
8383 try {
84- const { stdout } = await execAsync ( `scc . --format json2` ) ;
84+ const { stdout } = await execAsync ( `scc /github/workspace --format json2` ) ;
8585 const sccData = JSON . parse ( stdout ) ;
8686
8787 const laborHours = Math . ceil (
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ async function getMetaData(
8585}
8686
8787export async function run ( ) : Promise < void > {
88- const currentCodeJSON = await helpers . readJSON ( ". /code.json" ) ;
88+ const currentCodeJSON = await helpers . readJSON ( "/github/workspace /code.json" ) ;
8989 const metaData = await getMetaData ( currentCodeJSON ) ;
9090 let finalCodeJSON = { } as CodeJSON ;
9191
You can’t perform that action at this time.
0 commit comments