Skip to content

Commit

Permalink
Add job to export data to a Google spreadsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
tidoust committed Oct 30, 2024
1 parent 9bff879 commit 65929fe
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/sync-spreadsheet.yml
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

0 comments on commit 65929fe

Please sign in to comment.