-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (37 loc) · 1.36 KB
/
contributor_report.yaml
File metadata and controls
44 lines (37 loc) · 1.36 KB
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
name: Monthly contributor report
on:
workflow_dispatch:
schedule:
- cron: "3 2 1 * *"
permissions:
issues: write
jobs:
contributor_report:
name: contributor report
runs-on: ubuntu-latest
steps:
- name: Get dates for last month
shell: bash
run: |
# Calculate the first day of the previous month
start_date=$(date -d "last month" +%Y-%m-01)
# Calculate the last day of the previous month
end_date=$(date -d "$start_date +1 month -1 day" +%Y-%m-%d)
#Set an environment variable with the date range
echo "START_DATE=$start_date" >> "$GITHUB_ENV"
echo "END_DATE=$end_date" >> "$GITHUB_ENV"
- name: Run contributor action
uses: github-community-projects/contributors@0d5adc3833e89ee1f4145744f5d69313cf5ea238 # v1.7.8
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
START_DATE: ${{ env.START_DATE }}
END_DATE: ${{ env.END_DATE }}
REPOSITORY: github-community-projects/measure-innersource
SPONSOR_INFO: "true"
- name: Create issue
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6.0.0
with:
title: Monthly contributor report
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./contributors.md
assignees: zkoppert