2024-01-26 12:36:04 -05:00
|
|
|
name: Upload Technical Debt Metrics to Google Sheets
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2024-03-06 12:23:07 -05:00
|
|
|
- "[0-9].[0-9]"
|
2024-01-26 12:36:04 -05:00
|
|
|
|
|
|
|
jobs:
|
2024-02-06 12:56:03 -05:00
|
|
|
config:
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
outputs:
|
|
|
|
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
|
|
|
steps:
|
|
|
|
- name: "Check for secrets"
|
|
|
|
id: check
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
if [ -n "${{ (secrets.GSHEET_KEY != '' ) || '' }}" ]; then
|
|
|
|
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
|
|
|
fi
|
|
|
|
|
2024-01-26 12:36:04 -05:00
|
|
|
process-and-upload:
|
2024-02-06 12:56:03 -05:00
|
|
|
needs: config
|
|
|
|
if: needs.config.outputs.has-secrets
|
2024-01-26 12:36:04 -05:00
|
|
|
runs-on: ubuntu-latest
|
2024-02-06 12:56:03 -05:00
|
|
|
name: Generate Reports
|
2024-01-26 12:36:04 -05:00
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
2024-02-01 13:56:33 -05:00
|
|
|
uses: actions/checkout@v4
|
2024-01-26 12:36:04 -05:00
|
|
|
|
|
|
|
- name: Set up Node.js
|
2024-02-01 10:06:48 -05:00
|
|
|
uses: actions/setup-node@v4
|
2024-01-26 12:36:04 -05:00
|
|
|
with:
|
2024-04-02 18:48:08 -04:00
|
|
|
node-version: '18'
|
2024-01-26 12:36:04 -05:00
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm install
|
|
|
|
working-directory: ./superset-frontend
|
|
|
|
|
|
|
|
- name: Run Script
|
|
|
|
env:
|
2024-03-06 12:23:07 -05:00
|
|
|
SPREADSHEET_ID: "1oABNnzxJYzwUrHjr_c9wfYEq9dFL1ScVof9LlaAdxvo"
|
2024-01-26 12:36:04 -05:00
|
|
|
SERVICE_ACCOUNT_KEY: ${{ secrets.GSHEET_KEY }}
|
|
|
|
run: npm run lint-stats
|
2024-02-06 12:56:03 -05:00
|
|
|
continue-on-error: true
|
2024-01-26 12:36:04 -05:00
|
|
|
working-directory: ./superset-frontend
|