@@ -16,15 +16,109 @@ concurrency:
16
16
cancel-in-progress : false
17
17
18
18
jobs :
19
- update-metrics :
20
- name : Update Metrics
21
- uses : ./.github/workflows/update_data.yml
22
-
19
+ update :
20
+ strategy :
21
+ matrix :
22
+ orgs : ["DSACMS","Enterprise-CMCS","CMS-Enterprise","CMSgov"]
23
+ max-parallel : 1
24
+ permissions : write-all
25
+ name : update
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+ # update stats
30
+ - uses : actions/setup-python@v5
31
+ with :
32
+ python-version : ' 3.9'
33
+ - name : cache pip
34
+ uses : actions/cache@v4
35
+ with :
36
+ path : ~/.cache/pip
37
+ key : ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
38
+ restore-keys : |
39
+ ${{ runner.os }}-pip-
40
+ - run : pip install -r requirements.txt
41
+ - run : git pull && ./update.sh ${{ matrix.orgs }}
42
+ env :
43
+ GITHUB_TOKEN : ${{ secrets.METRICS_GITHUB_TOKEN }}
44
+ AUGUR_HOST : ${{ vars.AUGUR_HOST }}
45
+ - run : |
46
+ git config user.name 'GitHub Actions'
47
+ git config user.email '[email protected] '
48
+ git pull
49
+ git add -A
50
+ timestamp=$(date -u)
51
+ git commit -m "update ${{ matrix.orgs }} data: ${timestamp}" || exit 0
52
+ - name : Push to ${{ github.ref_name }}
53
+ uses : CasperWA/push-protected@v2
54
+ with :
55
+ token : ${{ secrets.METRICS_GITHUB_TOKEN }}
56
+ branch : ${{ github.ref_name }}
57
+ cocomo :
58
+ strategy :
59
+ matrix :
60
+ orgs : ["DSACMS", "Enterprise-CMCS", "CMS-Enterprise", "CMSgov"]
61
+ max-parallel : 1
62
+ permissions : write-all
63
+ name : cocomo
64
+ runs-on : ubuntu-latest
65
+ needs : update
66
+ steps :
67
+ - uses : actions/checkout@v4
68
+ - uses : actions/setup-go@v5
69
+ - name : Install scc
70
+ run : go install github.com/boyter/scc/v3@latest
71
+ - name : Run COCOMO script
72
+ run : ./scripts/scc_cocomo.sh ${{ matrix.orgs }}
73
+ - name : Commit changes
74
+ run : |
75
+ git config user.name 'GitHub Actions'
76
+ git config user.email '[email protected] '
77
+ git pull
78
+ git add -A
79
+ timestamp=$(date -u)
80
+ git commit -m "update ${{ matrix.orgs }} data: ${timestamp}" || exit 0
81
+ - name : Push to ${{ github.ref_name }}
82
+ uses : CasperWA/push-protected@v2
83
+ with :
84
+ token : ${{ secrets.METRICS_GITHUB_TOKEN }}
85
+ branch : ${{ github.ref_name }}
86
+ scorecard :
87
+ strategy :
88
+ matrix :
89
+ orgs : ["DSACMS", "Enterprise-CMCS", "CMS-Enterprise", "CMSgov"]
90
+ max-parallel : 1
91
+ permissions : write-all
92
+ name : scorecard
93
+ runs-on : ubuntu-latest
94
+ needs : cocomo
95
+ steps :
96
+ - uses : actions/checkout@v4
97
+ - uses : actions/setup-go@v5
98
+ - name : Install OSSF CLI
99
+ run : docker pull gcr.io/openssf/scorecard:stable
100
+ - name : Run OSSF Scorecard Report script
101
+ run : ./scripts/scorecard_internal.sh ${{ matrix.orgs }}
102
+ env :
103
+ GITHUB_TOKEN : ${{ secrets.METRICS_GITHUB_TOKEN }}
104
+ - name : Commit changes
105
+ run : |
106
+ git config user.name 'GitHub Actions'
107
+ git config user.email '[email protected] '
108
+ git pull
109
+ git add -A
110
+ timestamp=$(date -u)
111
+ git commit -m "update ${{ matrix.orgs }} data: ${timestamp}" || exit 0
112
+ - name : Push to ${{ github.ref_name }}
113
+ uses : CasperWA/push-protected@v2
114
+ with :
115
+ token : ${{ secrets.METRICS_GITHUB_TOKEN }}
116
+ branch : ${{ github.ref_name }}
23
117
update-reports-and-graphs :
24
118
permissions : write-all
25
119
name : update reports and graphs
26
120
runs-on : ubuntu-latest
27
- needs : update-metrics
121
+ needs : scorecard
28
122
steps :
29
123
- uses : actions/checkout@v4
30
124
# update stats
0 commit comments