Skip to content

Commit

Permalink
Update google sheet action and add env variables required
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffplays2005 committed Oct 5, 2024
1 parent d33066f commit 87d32a9
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/update_google_sheet_members.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ name: Update the google sheet with members

on:
workflow_dispatch:
# schedule:
# Updates every 00:00 every day
# - cron: "0 0 * * *"
schedule:
# Updates every 00:00 every day
- cron: "0 0 * * *"

env:
NEXT_PUBLIC_BACKEND_BASE_URL: ${{secrets.VITE_BACKEND_BASE_URL}}
GOOGLE_SHEET_ID: ${{secrets.GOOGLE_SHEET_ID}}
GOOGLE_SERVICE_ACCOUNT_JSON: ${{secrets.GOOGLE_SERVICE_ACCOUNT_JSON}}
VITE_BACKEND_BASE_URL: ${{secrets.VITE_BACKEND_BASE_URL}}

jobs:
update_google_sheet_members:
Expand All @@ -22,13 +25,6 @@ jobs:
- name: Install volta
uses: volta-cli/action@v4

- name: Get admin jwt token
id: get-admin-jwt
run: |
token_output=`yarn workspace server run token`
IFS=$'\n' read -d "\034" -r -a splitted <<<"${token_output}\034"
echo "jwt_token=$(echo ${splitted[2]})" >> $GITHUB_OUTPUT
- name: Update google sheet members with script
run: |
yarn workspace server update-google-sheet-members ${{ steps.get-admin-jwt.outputs.jwt_token }}
yarn workspace server update-google-sheet-members

0 comments on commit 87d32a9

Please sign in to comment.