File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : " Monthly Metrics: Contributors"
2
+ on :
3
+ workflow_dispatch :
4
+ schedule :
5
+ - cron : ' 3 2 1 * *'
6
+
7
+ permissions :
8
+ issues : write
9
+
10
+ jobs :
11
+ contributor_report :
12
+ name : contributor report
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+
17
+ - name : Get dates for last month
18
+ shell : bash
19
+ run : |
20
+ # Calculate the first day of the previous month
21
+ start_date=$(date -d "last month" +%Y-%m-01)
22
+
23
+ # Calculate the last day of the previous month
24
+ end_date=$(date -d "$start_date +1 month -1 day" +%Y-%m-%d)
25
+
26
+ # Set an environment variable with the date range
27
+ echo "START_DATE=$start_date" >> "$GITHUB_ENV"
28
+ echo "END_DATE=$end_date" >> "$GITHUB_ENV"
29
+
30
+ - name : Run contributor action
31
+ uses : github/contributors@v1
32
+ env :
33
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ START_DATE : ${{ env.START_DATE }}
35
+ END_DATE : ${{ env.END_DATE }}
36
+ REPOSITORY : InnerSourceCommons/InnerSourcePatterns
37
+ SPONSOR_INFO : " true"
38
+
39
+ - name : Create issue
40
+ uses : peter-evans/create-issue-from-file@v4
41
+ with :
42
+ title : " Monthly Metrics: Contributors"
43
+ token : ${{ secrets.GITHUB_TOKEN }}
44
+ content-filepath : ./contributors.md
45
+ assignees : spier
46
+ labels : |
47
+ community metrics
You can’t perform that action at this time.
0 commit comments