fix: contributors #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Contributors | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
contributor_report: | |
name: contributor report | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Set dates | |
shell: bash | |
run: | | |
start_date=2022-01-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: Contributors Action | |
uses: github/[email protected] | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
REPOSITORY: ${{ github.repository }} | |
- name: Create issue | |
uses: peter-evans/create-issue-from-file@v5 | |
with: | |
title: Contributor report | |
token: ${{ secrets.GH_TOKEN }} | |
content-filepath: ./CONTRIBUTORS.md |