Skip to content

rjoydip-zz/googlesheet-actions

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

googlesheet-actions

Github action for google spreadsheets to fetch data.

Inputs

sheet-id

Required - string - Google spreadsheets id which is published on web.

Outputs

result

steps.googlesheet_actions.outputs.result - json - Get all data as json format. The output is dependant on the output input.

Example usage

Simple example

- name: googlesheet-actions
  uses: rjoydip/googlesheet-actions@0.1.1

Full example

# bare minimal
name: googlesheet

on:
    push:
      branches:
        - master

jobs:
    fetch:
      runs-on: ubuntu-latest
      steps:
        - id: googlesheet_actions
          uses: rjoydip/googlesheet-actions@0.1.1
          with:
            sheet-id: ${{ secrets.SHEET_ID }}
        - id: echo
          uses: actions/github-script@v2
          with:
            github-token: ${{secrets.GITHUB_TOKEN}}
            script: |
                console.log(${{steps.googlesheet_actions.outputs.result}})
        - name: test
          run: |
            cat $HOME/data.json

Getting Started

Create the Google spreadsheet and publish it: