superlint/.github/workflows/thank_contributors.yaml
dependabot[bot] a090a4cf0e
deps(github-actions): bump peter-evans/create-issue-from-file (#5180)
Bumps [peter-evans/create-issue-from-file](https://github.com/peter-evans/create-issue-from-file) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-issue-from-file/releases)
- [Commits](https://github.com/peter-evans/create-issue-from-file/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-issue-from-file
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-29 20:47:29 +00:00

43 lines
1.2 KiB
YAML

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/contributors@v1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
START_DATE: ${{ env.START_DATE }}
END_DATE: ${{ env.END_DATE }}
REPOSITORY: super-linter/super-linter
- name: Create issue
uses: peter-evans/create-issue-from-file@v5
with:
title: Thank you super-linter contributors (${{ env.START_DATE }}..${{ env.END_DATE }})
token: ${{ secrets.GITHUB_TOKEN }}
content-filepath: ./contributors.md