44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
# .github/workflows/weekly-velocity-report.yml
|
|
|
|
name: Weekly Velocity Report
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 9 * * 1' # Runs every Monday at 9:00 AM UTC
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
generate_report:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Generate Weekly Report as CSV
|
|
id: report
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GH_PAT }}
|
|
GITHUB_REPO: ${{ github.repository }}
|
|
run: |
|
|
chmod +x ./.github/workflows/scripts/generate-report.sh
|
|
REPORT_CSV=$(./.github/workflows/scripts/generate-report.sh)
|
|
echo "csv_data<<EOF" >> $GITHUB_OUTPUT
|
|
echo "$REPORT_CSV" >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
- name: Append data to Google Sheet
|
|
if: success()
|
|
uses: jroehl/gsheet-action@v2.1.1
|
|
with:
|
|
spreadsheetId: ${{ secrets.SPREADSHEET_ID }}
|
|
commands: |
|
|
[
|
|
{
|
|
"command": "appendData",
|
|
"params": {
|
|
"sheetName": "Weekly Reports",
|
|
"data": "${{ steps.report.outputs.csv_data }}"
|
|
}
|
|
}
|
|
]
|