Update weekly-velocity-report.yml
This commit is contained in:
parent
dadf05809c
commit
2e9236fab4
|
@ -1,43 +1,24 @@
|
|||
# .github/workflows/weekly-velocity-report.yml
|
||||
name: Test Third-Party Action Access
|
||||
|
||||
name: Weekly Velocity Report
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 9 * * 1' # Runs every Monday at 9:00 AM UTC
|
||||
workflow_dispatch:
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
generate_report:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
- name: This is an official action that will likely work
|
||||
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
|
||||
- name: This is a very popular, non-official action
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
spreadsheetId: ${{ secrets.SPREADSHEET_ID }}
|
||||
commands: |
|
||||
[
|
||||
{
|
||||
"command": "appendData",
|
||||
"params": {
|
||||
"sheetName": "Weekly Reports",
|
||||
"data": "${{ steps.report.outputs.csv_data }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
node-version: '20'
|
||||
|
||||
- name: This is the Google Sheets action we want to use
|
||||
uses: gautamkrishnar/append-csv-to-google-sheet-action@v2
|
||||
with:
|
||||
# We don't need real inputs, we just want to see if it can be found
|
||||
sheet-name: 'Test'
|
||||
csv-text: 'test'
|
||||
spreadsheet-id: 'test'
|
||||
google-api-key-base64: 'test'
|
||||
|
|
Loading…
Reference in New Issue