Skip to content

Commit d33759e

Browse files
authored
Merge pull request #294 from oleksis/gh-pages
Update contributor report workflow
2 parents 24d094a + e9ac3df commit d33759e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/contributors.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,31 @@ jobs:
1919
- name: Checkout repository
2020
uses: actions/checkout@v4
2121

22+
- name: Get dates for last month
23+
shell: bash
24+
run: |
25+
# Calculate the first day of the previous month
26+
start_date=$(date -d "last month" +%Y-%m-01)
27+
28+
# Calculate the last day of the previous month
29+
end_date=$(date -d "$start_date +1 month -1 day" +%Y-%m-%d)
30+
31+
#Set an environment variable with the date range
32+
echo "START_DATE=$start_date" >> "$GITHUB_ENV"
33+
echo "END_DATE=$end_date" >> "$GITHUB_ENV"
34+
2235
- name: Run contributor action
2336
uses: github/contributors@v1
2437
env:
2538
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
START_DATE: ${{ env.START_DATE }}
40+
END_DATE: ${{ env.END_DATE }}
2641
ORGANIZATION: BlackPythonDevs
2742
SPONSOR_INFO: "true"
2843

2944
- name: Create issue
3045
id: ciff
31-
uses: peter-evans/create-issue-from-file@v4
46+
uses: peter-evans/create-issue-from-file@v5
3247
with:
3348
title: Monthly contributor report
3449
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)