-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add job to export data to a Google spreadsheet
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: "[M] Export to a Google spreadsheet" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
sheet: | ||
description: 'The ID of the Google spreadsheet where data needs to be exported' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
suggest-grid: | ||
name: Export data to Google spreadsheet | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Checkout latest version of release script | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: main | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Dump key file | ||
run: echo '${{ secrets.GOOGLE_KEY }}' > key.json | ||
|
||
- name: Export data | ||
run: npx tpac-breakouts sync-sheet --sheet ${{ inputs.sheet }} | ||
env: | ||
PROJECT_OWNER: ${{ vars.PROJECT_OWNER_TYPE || 'organization' }}/${{ vars.PROJECT_OWNER || 'w3c' }} | ||
PROJECT_NUMBER: ${{ vars.PROJECT_NUMBER }} | ||
GRAPHQL_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GRAPHQL_TOKEN }} | ||
W3CID_MAP: ${{ vars.W3CID_MAP }} | ||
GOOGLE_KEY_FILE: key.json |